mirror of git://gcc.gnu.org/git/gcc.git
Import GNU Classpath (20121202).
2012-12-19 Matthias Klose <doko@ubuntu.com> Import GNU Classpath (20121202). * Regenerate class and header files. * Regenerate auto* files. * sources.am, gcj/javaprims.h: Regenerate. * gnu/java/nio/FileLockImpl.java (close): New override. From-SVN: r194618
This commit is contained in:
parent
baeb2e1647
commit
a1906e8bbf
|
@ -1,3 +1,12 @@
|
||||||
|
2012-12-19 Matthias Klose <doko@ubuntu.com>
|
||||||
|
|
||||||
|
Import GNU Classpath (20121202).
|
||||||
|
|
||||||
|
* Regenerate class and header files.
|
||||||
|
* Regenerate auto* files.
|
||||||
|
* sources.am, gcj/javaprims.h: Regenerate.
|
||||||
|
* gnu/java/nio/FileLockImpl.java (close): New override.
|
||||||
|
|
||||||
2012-12-12 H.J. Lu <hongjiu.lu@intel.com>
|
2012-12-12 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* Makefile.am (lib_gnu_awt_xlib_la_CPPFLAGS): Use
|
* Makefile.am (lib_gnu_awt_xlib_la_CPPFLAGS): Use
|
||||||
|
|
|
@ -4,21 +4,981 @@
|
||||||
* tools/gnu/classpath/tools/javah/Main.java (parseClasses): Don't
|
* tools/gnu/classpath/tools/javah/Main.java (parseClasses): Don't
|
||||||
scan inner classes if our item is a file.
|
scan inner classes if our item is a file.
|
||||||
|
|
||||||
2012-09-14 David Edelsohn <dje.gcc@gmail.com>
|
2012-11-02 Andrew John Hughes <gnu_andrew@member.fsf.org>
|
||||||
|
|
||||||
* configure: Regenerated.
|
PR classpath/55182
|
||||||
|
* configure.ac:
|
||||||
|
Lower required version to support autoconf
|
||||||
|
on RHEL6. Make disabling Werror the default.
|
||||||
|
If a Qt4-specific moc is detected, use it
|
||||||
|
rather than the default.
|
||||||
|
* doc/Makefile.am:
|
||||||
|
Generate texi2dvi output in the build directory
|
||||||
|
and explicitly specify POSIX locale to work around
|
||||||
|
Debian bug 586134.
|
||||||
|
(clean-local): Remove output from texi2dvi.
|
||||||
|
|
||||||
|
2012-10-30 Andrew John Hughes <gnu_andrew@member.fsf.org>
|
||||||
|
|
||||||
|
PR classpath/55140
|
||||||
|
* NEWS: List fix.
|
||||||
|
* java/lang/String.java:
|
||||||
|
(codePointBefore(int)): Fix index check to match spec.
|
||||||
|
|
||||||
|
2012-10-16 Ivan Maidanski <ivmai@mail.ru>
|
||||||
|
|
||||||
|
* java/util/Collections.java:
|
||||||
|
(emptySet()): Don't create new instance, instead using
|
||||||
|
the corresponding immutable container instance. Remove FIXME
|
||||||
|
and suppress resulting unchecked warning.
|
||||||
|
(EmptySet.iterator()): Suppress warning due to cast
|
||||||
|
for immutable container instance.
|
||||||
|
(EmptySet.equals(Object)): Add type parameters.
|
||||||
|
(emptyList()): Don't create new instance, instead using
|
||||||
|
the corresponding immutable container instance. Remove FIXME
|
||||||
|
and suppress resulting unchecked warning.
|
||||||
|
(EmptyList.equals(Object)): Add type parameters.
|
||||||
|
(emptyMap()): Don't create new instance, instead using
|
||||||
|
the corresponding immutable container instance. Remove FIXME
|
||||||
|
and suppress resulting unchecked warning.
|
||||||
|
(EmptyMap.entrySet()): Cast to parameterised type and
|
||||||
|
suppress warning.
|
||||||
|
(EmptyMap.equals(Object)): Add type parameters.
|
||||||
|
(EmptyMap.keySet()): Cast to parameterised type and
|
||||||
|
suppress warning.
|
||||||
|
(EmptyMap.values()): Likewise.
|
||||||
|
(SingletonList.subList(int, int)): Use emptyList() instead of
|
||||||
|
EMPTY_LIST to eliminate unchecked warning.
|
||||||
|
(SynchronizedCollection.toArray(T[])): Rename T type to E to
|
||||||
|
suppress compiler warning about type hiding.
|
||||||
|
|
||||||
|
2012-10-26 Andrew John Hughes <gnu_andrew@member.fsf.org>
|
||||||
|
|
||||||
|
PR classpath/41689
|
||||||
|
* javax/security/sasl/Sasl.java:
|
||||||
|
(CREDENTIALS): Add missing field.
|
||||||
|
* NEWS: Updated.
|
||||||
|
|
||||||
|
2012-10-26 Andrew John Hughes <gnu_andrew@member.fsf.org>
|
||||||
|
|
||||||
|
* NEWS: Updated with latest bug fixes.
|
||||||
|
* THANKYOU: Add bug authors.
|
||||||
|
|
||||||
|
2010-05-20 Paul Viney <paul@diasoft.nl>
|
||||||
|
|
||||||
|
PR classpath/44208
|
||||||
|
* java/io/ObjectInputStream.java,
|
||||||
|
(parseContent(byte,boolean)): Ensure a handle
|
||||||
|
for the enum is registered before one for its
|
||||||
|
String constant.
|
||||||
|
|
||||||
|
2009-12-30 Paul Fernhout <pdfernhout@kurtz-fernhout.com>
|
||||||
|
|
||||||
|
PR classpath/42551
|
||||||
|
* javax/sound/midi/MetaMessage.java:
|
||||||
|
(setMessage(int,byte[],int)): Don't overwrite
|
||||||
|
length variable when computing the length representation.
|
||||||
|
|
||||||
|
2012-10-17 Jeremy Singer <Jeremy.Singer@glasgow.ac.uk>
|
||||||
|
|
||||||
|
PR classpath/54960
|
||||||
|
* gnu/xml/transform/SAXSerializer.java:
|
||||||
|
(getValue(String)): Avoid NullPointerException.
|
||||||
|
|
||||||
|
2012-10-26 Andrew John Hughes <gnu_andrew@member.fsf.org>
|
||||||
|
|
||||||
|
* native/jni/midi-dssi/gnu_javax_sound_midi_dssi_DSSISynthesizer.c:
|
||||||
|
(Java_gnu_javax_sound_midi_dssi_DSSISynthesizer_open_1(JNIEnv*,
|
||||||
|
jclass, jlong)): Use jack_client_open instead of
|
||||||
|
deprecated jack_client_new.
|
||||||
|
|
||||||
|
2012-10-15 Andrew John Hughes <gnu_andrew@member.fsf.org>
|
||||||
|
|
||||||
|
* configure.ac: Set to 0.99.1pre, as
|
||||||
|
0.99.1 will now be next release.
|
||||||
|
* NEWS: Updated with last bug fix
|
||||||
|
and 0.99.1
|
||||||
|
|
||||||
|
2012-10-15 Andrew John Hughes <gnu_andrew@member.fsf.org>
|
||||||
|
|
||||||
|
PR classpath/54931
|
||||||
|
* m4/acinclude.m4:
|
||||||
|
(CLASSPATH_WITH_GJDOC): Allow GJDoc versions
|
||||||
|
included with GNU Classpath to be used to
|
||||||
|
build (0.98 on).
|
||||||
|
|
||||||
|
2012-03-15 Pekka Enberg <penberg@kernel.org>
|
||||||
|
|
||||||
|
* java/util/Formatter.java:
|
||||||
|
(icharacterFormat(Object,int,int,int,char):
|
||||||
|
Fix NullPointerException for null characters.
|
||||||
|
(basicIntegralConversion(Object, int, int, int, int, char):
|
||||||
|
Fix NullPointerException for null integers.
|
||||||
|
(format(Locale, String, Object...)):
|
||||||
|
Fix NullPointerException for null object.
|
||||||
|
|
||||||
|
2012-03-15 Pekka Enberg <penberg@kernel.org>
|
||||||
|
|
||||||
|
* java/lang/String.java:
|
||||||
|
(codePointAt(int))): Fix exception type.
|
||||||
|
(codePointBefore(int)): Fix exception type.
|
||||||
|
|
||||||
|
2011-07-20 Ivan Maidanski <ivmai@mail.ru>
|
||||||
|
|
||||||
|
* native/jni/java-util/java_util_VMTimeZone.c:
|
||||||
|
Include jcl.h file.
|
||||||
|
(Java_java_util_VMTimeZone_getSystemTimeZoneId(JNIEnv*,jclass)):
|
||||||
|
Throw OutOfMemoryException in case of malloc() failure.
|
||||||
|
|
||||||
|
2012-06-10 Ivan Maidanski <ivmai@mail.ru>
|
||||||
|
|
||||||
|
* compat/.gitignore,
|
||||||
|
* compat/java.net/.gitignore,
|
||||||
|
* doc/.gitignore,
|
||||||
|
* doc/api/.gitignore,
|
||||||
|
* doc/www.gnu.org/.gitignore,
|
||||||
|
* doc/www.gnu.org/announce/.gitignore,
|
||||||
|
* doc/www.gnu.org/cp-tools/.gitignore,
|
||||||
|
* doc/www.gnu.org/docs/.gitignore,
|
||||||
|
* doc/www.gnu.org/downloads/.gitignore,
|
||||||
|
* doc/www.gnu.org/events/.gitignore,
|
||||||
|
* doc/www.gnu.org/faq/.gitignore,
|
||||||
|
* examples/.gitignore,
|
||||||
|
* external/.gitignore,
|
||||||
|
* external/jsr166/.gitignore,
|
||||||
|
* external/relaxngDatatype/.gitignore,
|
||||||
|
* external/sax/.gitignore,
|
||||||
|
* external/w3c_dom/.gitignore,
|
||||||
|
* gnu/classpath/.gitignore,
|
||||||
|
* gnu/java/locale/.gitignore,
|
||||||
|
* gnu/java/security/.gitignore,
|
||||||
|
* gnu/test/.gitignore,
|
||||||
|
* include/.gitignore,
|
||||||
|
* java/util/.gitignore,
|
||||||
|
* lib/.gitignore,
|
||||||
|
* native/.gitignore,
|
||||||
|
* native/fdlibm/.gitignore,
|
||||||
|
* native/jawt/.gitignore,
|
||||||
|
* native/jni/.gitignore,
|
||||||
|
* native/jni/classpath/.gitignore,
|
||||||
|
* native/jni/gconf-peer/.gitignore,
|
||||||
|
* native/jni/gstreamer-peer/.gitignore,
|
||||||
|
* native/jni/gtk-peer/.gitignore,
|
||||||
|
* native/jni/java-io/.gitignore,
|
||||||
|
* native/jni/java-lang/.gitignore,
|
||||||
|
* native/jni/java-math/.gitignore,
|
||||||
|
* native/jni/java-net/.gitignore,
|
||||||
|
* native/jni/java-nio/.gitignore,
|
||||||
|
* native/jni/java-util/.gitignore,
|
||||||
|
* native/jni/midi-alsa/.gitignore,
|
||||||
|
* native/jni/midi-dssi/.gitignore,
|
||||||
|
* native/jni/native-lib/.gitignore,
|
||||||
|
* native/jni/qt-peer/.gitignore,
|
||||||
|
* native/jni/xmlj/.gitignore,
|
||||||
|
* native/plugin/.gitignore,
|
||||||
|
* native/testsuite/.gitignore,
|
||||||
|
* native/vmi/.gitignore,
|
||||||
|
* resource/.gitignore,
|
||||||
|
* resource/META-INF/services/.gitignore,
|
||||||
|
* scripts/.gitignore,
|
||||||
|
* test/.gitignore,
|
||||||
|
* test/gnu.java.lang.reflect/.gitignore,
|
||||||
|
* test/java.io/.gitignore,
|
||||||
|
* test/java.lang.reflect/.gitignore,
|
||||||
|
* test/java.net/.gitignore,
|
||||||
|
* test/java.util/.gitignore,
|
||||||
|
* tools/.gitignore,
|
||||||
|
* tools/gnu/classpath/tools/doclets/.gitignore,
|
||||||
|
* tools/gnu/classpath/tools/doclets/debugdoclet/.gitignore,
|
||||||
|
* tools/gnu/classpath/tools/doclets/htmldoclet/.gitignore,
|
||||||
|
* tools/gnu/classpath/tools/doclets/xmldoclet/.gitignore,
|
||||||
|
* tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/.gitignore,
|
||||||
|
* tools/gnu/classpath/tools/gjdoc/.gitignore,
|
||||||
|
* tools/gnu/classpath/tools/gjdoc/expr/.gitignore,
|
||||||
|
* tools/gnu/classpath/tools/java2xhtml/.gitignore,
|
||||||
|
* tools/gnu/classpath/tools/taglets/.gitignore,
|
||||||
|
* vm/.gitignore,
|
||||||
|
* vm/reference/.gitignore: Renamed from .cvsignore.
|
||||||
|
|
||||||
|
2012-10-10 Andrew John Hughes <gnu_andrew@member.fsf.org>
|
||||||
|
|
||||||
|
* java/awt/geom/Area.java:
|
||||||
|
(solids): Add type parameter.
|
||||||
|
(holes): Likewise.
|
||||||
|
(ccIntersections): Likewise and rename to meet
|
||||||
|
standards.
|
||||||
|
(Area()): Add type parameters.
|
||||||
|
(Area(Shape)): Likewise and remove redundant casts.
|
||||||
|
(add(Area)): Likewise and remove unused nNodes variable.
|
||||||
|
(subtract(Area)): Likewise.
|
||||||
|
(intersect(Area)): Likewise.
|
||||||
|
(exclusiveOr(Area)): Likewise.
|
||||||
|
(reset()): Add type parameters.
|
||||||
|
(isEmpty()): Remove redundant casts.
|
||||||
|
(isPolygonal()): Likewise.
|
||||||
|
(isRectangular()): Likewise.
|
||||||
|
(getBounds2D()): Likewise.
|
||||||
|
(clone()): Likewise.
|
||||||
|
(equals(Area)): Add type parameters.
|
||||||
|
(transform(AffineTransform)): Remove redundant casts.
|
||||||
|
(contains(double,double)): Likewise.
|
||||||
|
(contains(double,double,double,double)): Likewise.
|
||||||
|
(intersects(double,double,double,double)): Likewise.
|
||||||
|
(AreaIterator.segments): Add type parameter.
|
||||||
|
(AreaIterator(AffineTransform)): Add type parameters.
|
||||||
|
Remove redundant casts.
|
||||||
|
(currentSegment(double[])): Remove redundant casts.
|
||||||
|
(currentSegment(float[])): Likewise.
|
||||||
|
(weilerAtherton(Vector)): Add type parameters and remove
|
||||||
|
redundant casts.
|
||||||
|
(recursiveSubdivide(CubicCurve2D,CubicCurve2D,int,int,double,
|
||||||
|
double,double,double)): Fix use of cc_intersections/ccIntersections.
|
||||||
|
(cubicCubicIntersect(CubicSegment,CubicSegment)): Likewise.
|
||||||
|
(lineQuadIntersect(LineSegment,QuadSegment)): Fix Javadoc typo.
|
||||||
|
(makeSegment(Shape)): Add type parameters.
|
||||||
|
(createNodes(Segment,Segment)): Remove redundant bracketing.
|
||||||
|
(deleteRedundantPaths(Vector)): Likewise. Remove redundant
|
||||||
|
casts. Add type parameters.
|
||||||
|
(setDirection(Vector,boolean)): Add type parameters and remove
|
||||||
|
redundant casts.
|
||||||
|
(cloneSegmentList()): Add type parameter. Remove redundant
|
||||||
|
cast.
|
||||||
|
(createNodes(Segment,Intersection[])): Add type parameter.
|
||||||
|
Remove redundant cast.
|
||||||
|
|
||||||
|
2012-10-09 Andrew John Hughes <gnu_andrew@member.fsf.org>
|
||||||
|
|
||||||
|
* gnu/javax/sound/midi/dssi/DSSIMidiDeviceProvider.java:
|
||||||
|
(DSSIInfo.copyright): Added field.
|
||||||
|
(DSSIInfo(String,String,String,String,String,String,long)):
|
||||||
|
Extended constructor to store copyright.
|
||||||
|
(examineLibrary(String)): Add type parameter.
|
||||||
|
Fix call to new DSSIInfo constructor.
|
||||||
|
(static): Add type parameters.
|
||||||
|
* gnu/javax/sound/midi/dssi/DSSISynthesizer.java:
|
||||||
|
(instruments): Add type parameter.
|
||||||
|
(resources): Likewise.
|
||||||
|
(getResources()): Remove redundant cast.
|
||||||
|
(getInstruments()): Likewise.
|
||||||
|
(getInstrument(Patch)): Add type parameter and remove
|
||||||
|
redundant cast.
|
||||||
|
(soundbanks): Add type parameter.
|
||||||
|
(getAvailableInstruments()): Add type parameters and
|
||||||
|
remove redundant casts.
|
||||||
|
* gnu/javax/sound/midi/file/MidiFileReader.java:
|
||||||
|
(getSequence(InputStream)): Don't store length as not used.
|
||||||
|
* gnu/javax/sound/midi/file/MidiFileWriter.java:
|
||||||
|
(computeTrackLength(Track,MidiDataOutputStream)): Drop unused
|
||||||
|
count variable.
|
||||||
|
* gnu/javax/sound/sampled/WAV/WAVReader.java:
|
||||||
|
(getAudioFileFormat(InputStream)): Drop unused blockAlign variable.
|
||||||
|
* gnu/javax/sound/sampled/gstreamer/GStreamerMixer.java:
|
||||||
|
(getLine(Line.Info)): Add type parameter to Class.
|
||||||
|
* javax/sound/midi/MidiSystem.java:
|
||||||
|
(getMidiDeviceInfo()): Add type parameters. Remove unnecessary cast.
|
||||||
|
(getMidiDevice(MidiDevice.Info)): Add type parameter.
|
||||||
|
(getSoundbank(InputStream)): Add type parameters and remove
|
||||||
|
unnecessary casts.
|
||||||
|
(getSoundbank(URL)): Likewise.
|
||||||
|
(getSoundbank(File)): Likewise.
|
||||||
|
(getMidiFileFormat(InputStream)): Likewise.
|
||||||
|
(getMidiFileFormat(URL)): Likewise.
|
||||||
|
(getMidiFileFormat(File)): Likewise.
|
||||||
|
(getSequence(InputStream)): Likewise.
|
||||||
|
(getSequence(URL)): Likewise.
|
||||||
|
(getSequence(File)): Likewise.
|
||||||
|
(getMidiFileTypes()): Likewise.
|
||||||
|
(isFileTypeSupported(int)): Likewise.
|
||||||
|
(getMidiFileTypes(Sequence)): Likewise.
|
||||||
|
(isFileTypeSupported(int,Sequence)): Likewise.
|
||||||
|
(write(Sequence,int,OutputStream)): Likewise.
|
||||||
|
(write(Sequence,int,File)): Likewise.
|
||||||
|
* javax/sound/midi/SoundbankResource.java:
|
||||||
|
(dataClass): Add type parameter.
|
||||||
|
* javax/sound/midi/Track.java:
|
||||||
|
(events): Add type parameter.
|
||||||
|
(eventSet): Likewise.
|
||||||
|
(add(MidiEvent)): Remove redundant cast.
|
||||||
|
(get(int)): Likewise.
|
||||||
|
(ticks()): Likewise.
|
||||||
|
* javax/sound/sampled/AudioSystem.java:
|
||||||
|
(getAudioFileFormat(File)): Add type parameters and
|
||||||
|
remove unnecessary casts.
|
||||||
|
(getAudioFileFormat(InputStream)): Likewise.
|
||||||
|
(getAudioFileFormat(URL)): Likewise.
|
||||||
|
(getAudioFileTypes()): Likewise.
|
||||||
|
(getAudioFileTypes(AudioInputStream)): Likewise.
|
||||||
|
(getAudioInputStream(AudioFormat.Encoding,AudioInputStream)):
|
||||||
|
Likewise.
|
||||||
|
(getAudioInputStream(AudioFormat,AudioInputStream)): Likewise.
|
||||||
|
(getAudioInputStream(File)): Likewise.
|
||||||
|
(getAudioInputStream(InputStream)): Likewise.
|
||||||
|
(getAudioInputStream(URL)): Likewise.
|
||||||
|
(getMixer(Mixer.Info)): Likewise.
|
||||||
|
(getMixerInfo()): Likewise.
|
||||||
|
(getTargetEncodings(AudioFormat.Encoding)): Likewise.
|
||||||
|
(getTargetEncodings(AudioFormat)): Likewise.
|
||||||
|
(getTargetFormats(AudioFormat.Encoding,AudioFormat)): Likewise.
|
||||||
|
(isConversionSupported(AudioFormat.Encoding,AudioFormat)): Likewise.
|
||||||
|
(isConversionSupported(AudioFormat,AudioFormat)): Likewise.
|
||||||
|
(write(AudioInputStream,AudioFileFormat.Type,File)): Likewise.
|
||||||
|
(write(AudioInputStream,AudioFileFormat.Type,OutputStream)): Likewise.
|
||||||
|
* javax/sound/sampled/Line.java:
|
||||||
|
(klass): Add type parameter.
|
||||||
|
* m4/ac_prog_javac.m4:
|
||||||
|
(ECJ_OPTS): Turn of unused private field warnings for now,
|
||||||
|
as some may be used from native code.
|
||||||
|
|
||||||
|
2012-09-26 Andrew John Hughes <gnu_andrew@member.fsf.org>
|
||||||
|
|
||||||
|
PR classpath/42134
|
||||||
|
* java/text/Bidi.java:
|
||||||
|
(Bidi(AttributedCharacterIterator)): Remove shadow
|
||||||
|
variable text which hides the instance variable
|
||||||
|
of the same name. Remove unnecessary use of this.
|
||||||
|
* NEWS: Updated.
|
||||||
|
|
||||||
|
2012-09-24 Andrew John Hughes <gnu_andrew@member.fsf.org>
|
||||||
|
|
||||||
|
* tools/com/sun/javadoc/Doc.java:
|
||||||
|
Add type parameter to Comparable.
|
||||||
|
* tools/gnu/classpath/tools/doclets/AbstractDoclet.java:
|
||||||
|
(tagletMap): Use type parameters.
|
||||||
|
(packageGroups): Likewise.
|
||||||
|
(tagletPath): Removed, unused.
|
||||||
|
(mentionedTags): Use type parameters.
|
||||||
|
(optionNoEmailWarn): Removed, unused.
|
||||||
|
(optionTagletPath): Likewise.
|
||||||
|
(DocletOptionTaglet): Likewise.
|
||||||
|
(DocletOptionGroup.set(String[])): Add type aprameters to
|
||||||
|
groupPackages.
|
||||||
|
(DocletOptionTagletPath): Removed, unused.
|
||||||
|
(commonOptions): Remove optionTagletPath.
|
||||||
|
(nameToOptionMap): Add type parameters.
|
||||||
|
(getOptionLength(String)): Remove unnecessary cast.
|
||||||
|
(getKnownDirectSubclasses(ClassDoc)): Add type parameters.
|
||||||
|
(IndexKey): Add type parameter to Comparable.
|
||||||
|
(IndexKey.compareTo(IndexKey)): Update to use specific type.
|
||||||
|
(categorizedIndex): Use type parameters.
|
||||||
|
(getCategorizedIndex()): Likewise.
|
||||||
|
(indexByName): Likewise.
|
||||||
|
(getIndexByName()): Likewise.
|
||||||
|
(printTaglets(Tag[],TagletContext,TagletPrinter,boolean)): Likewise.
|
||||||
|
(addUsedBy(Map,ClassDoc,UsageType,Doc,PackageDoc)): Likewise.
|
||||||
|
(collectUsage()): Likewise.
|
||||||
|
(usedClassToPackagesMap): Likewise.
|
||||||
|
(getUsageOfClass(ClassDoc)): Likewise.
|
||||||
|
(UsageType): Add type parameter to Comparable.
|
||||||
|
(UsageType.compareTo(UsageType)): Update to use specific type.
|
||||||
|
(getPackageGroups()): Use type parameters.
|
||||||
|
* tools/gnu/classpath/tools/doclets/PackageMatcher.java:
|
||||||
|
(patterns): Use type parameters.
|
||||||
|
(filter(Packagedoc[])): Likewise.
|
||||||
|
(match(PackageDoc)): Likewise.
|
||||||
|
* tools/gnu/classpath/tools/doclets/htmldoclet/HtmlDoclet.java:
|
||||||
|
(externalDocSets): Use type parameters.
|
||||||
|
(packageNameToDocSet)): Likewise.
|
||||||
|
(printPackagePage(File,String,PackageDoc,PackageDoc,PackageDoc)): Likewise.
|
||||||
|
(TreeNode): Add type parameter to Comparable.
|
||||||
|
(TreeNode.children): Use type parameters.
|
||||||
|
(TreeNode.compareTo(TreeNode)): Update to use specific type.
|
||||||
|
(addClassTreeNode(Map,ClassDoc)): Use type parameters.
|
||||||
|
(addInterfacetreeNode(Map,ClassDoc)): Likewise.
|
||||||
|
(printClassTree(HtmlPage,ClassDoc[])): Likewise.
|
||||||
|
(printInterfaceTree(HtmlPage,ClassDoc[])): Likewise.
|
||||||
|
(printFullTreePage()): Likewise.
|
||||||
|
(printIndexEntry(HtmlPage,Doc)): Likewise.
|
||||||
|
(printPackagesMenuPage()): Likewise.
|
||||||
|
(printClassMenuSection(HtmlPage,Collection,String)): Likewise.
|
||||||
|
(printClassMenuList(HtmlPage,ClassDoc[],boolean)): Likewise.
|
||||||
|
(printSplitIndex()): Likewise.
|
||||||
|
(printIndexPage(int,int,Character,List)): Likewise.
|
||||||
|
(printSerializationPage()): Likewise.
|
||||||
|
(printDeprecationPage()): Likewise.
|
||||||
|
(getMemberDocURL(HtmlPage,ProgramElementDoc)): Likewise.
|
||||||
|
(createTypeHref(HtmlPage,Type,boolean)): Likewise.
|
||||||
|
(getPackageURL(PackageDoc)): Remove redundant cast.
|
||||||
|
(getClassURL(ClassDoc)): Likewise.
|
||||||
|
* tools/gnu/classpath/tools/gjdoc/ClassDocImpl.java:
|
||||||
|
(primitiveNames): Add type parameters.
|
||||||
|
(findClassCache): Likewise.
|
||||||
|
(findClass(String,String): Likewise.
|
||||||
|
(createInstance(ClassDoc,PackageDoc,ClassDoc[],PackageDoc[],
|
||||||
|
char[],int,int,List)): Likewise.
|
||||||
|
(resolve()): Likewise.
|
||||||
|
(typeMap): Likewise.
|
||||||
|
(typeForString(String)): Likewise..
|
||||||
|
(equals(Object)): Likewise.
|
||||||
|
(maybeSerMethodList): Likewise.
|
||||||
|
(setMaybeSerMethodList(List)): Likewise.
|
||||||
|
(findFieldValue(String,ClassDoc,String,Set)): Likewise.
|
||||||
|
(getValue(String,Set)): Likewise.
|
||||||
|
(compareTo(Doc)): Use specific type.
|
||||||
|
(importStatementList): Use type parameters.
|
||||||
|
(setImportStatementList(List)): Likewise.
|
||||||
|
* tools/gnu/classpath/tools/gjdoc/ClassDocProxy.java:
|
||||||
|
(compareTo(Doc)): Use specific type.
|
||||||
|
* tools/gnu/classpath/tools/gjdoc/ClassDocReflectedImpl.java:
|
||||||
|
Expand imports.
|
||||||
|
(findClass(String)): Don't use full class name for String.
|
||||||
|
(compareTo(Doc)): Use specific type.
|
||||||
|
* tools/gnu/classpath/tools/gjdoc/DocImpl.java:
|
||||||
|
(compareTo(Doc)): Use specific type.
|
||||||
|
* tools/gnu/classpath/tools/gjdoc/ExecutableMemberDocImpl.java:
|
||||||
|
(compareTo(Doc)): Use specific type.
|
||||||
|
* tools/gnu/classpath/tools/gjdoc/FieldDocImpl.java:
|
||||||
|
(createFromSource(ClassDoc,PackageDoc,char[],int,int)):
|
||||||
|
Use type parameters. Remove unused lastFieldDefStart
|
||||||
|
variable.
|
||||||
|
(constantValue(Set)): Use type parameters.
|
||||||
|
* tools/gnu/classpath/tools/gjdoc/Main.java:
|
||||||
|
(option_overview): Removed unused field.
|
||||||
|
(option_classpath): Likewise.
|
||||||
|
(option_sourcepath): Add type parameters.
|
||||||
|
(option_extdirs): Removed unused field.
|
||||||
|
(option_verbose): Likewise.
|
||||||
|
(option_java_flags): Likewise.
|
||||||
|
(option_subpackages): Add type parameters.
|
||||||
|
(option_exclude): Likewise.
|
||||||
|
(startDoclet(List)): Likewise.
|
||||||
|
(addFoundPackages(String,Set)): Likewise.
|
||||||
|
(findPackages(String,File,Set)): Likewise.
|
||||||
|
(start(String[])): Likewise.
|
||||||
|
(addJavaLangClasses()): Commented out, apparently unused.
|
||||||
|
(options): Add type parameters.
|
||||||
|
(initOptions()): Likewise. Remove redundant variable
|
||||||
|
setting.
|
||||||
|
* tools/gnu/classpath/tools/gjdoc/MemberDocImpl.java:
|
||||||
|
(compareTo(Doc)): Use specific type.
|
||||||
|
* tools/gnu/classpath/tools/gjdoc/PackageDocImpl.java:
|
||||||
|
(allClassesSet): Use type parameters.
|
||||||
|
(ordinaryClassesList): Likewise.
|
||||||
|
(exceptionsList): Likewise.
|
||||||
|
(interfacesList): Likewise.
|
||||||
|
(errorsList): Likewise.
|
||||||
|
(resolve()): Likewise.
|
||||||
|
(toClassDocArray(Collection)): Likewise.
|
||||||
|
(compareTo(Doc)): Use specific type.
|
||||||
|
* tools/gnu/classpath/tools/gjdoc/Parser.java:
|
||||||
|
Expand import statements.
|
||||||
|
(process(Parser,char[],int,int)): Add type parameters.
|
||||||
|
(processedFiles): Add type parameters.
|
||||||
|
(processSourceFile(File,boolean,String,String)): Add type
|
||||||
|
parameters.
|
||||||
|
(classOpened(char[],int,int)): Likewise.
|
||||||
|
(toArray(List,T[])): Likewise.
|
||||||
|
(classClosed()): Likewise.
|
||||||
|
(Context.fieldList): Likewise.
|
||||||
|
(Context.filteredFieldList): Likewise.
|
||||||
|
(Context.sfieldList): Likewise.
|
||||||
|
(Context.methodList): Likewise.
|
||||||
|
(Context.filteredMethodList): Likewise.
|
||||||
|
(Context.maybeSerMethodList): Likewise.
|
||||||
|
(Context.constructorList): Likewise.
|
||||||
|
(Context.filteredConstructorList): Likewise.
|
||||||
|
(Context.innerClassesList): Likewise.
|
||||||
|
(Context.filteredInnerClassesList): Likewise.
|
||||||
|
* tools/gnu/classpath/tools/gjdoc/RootDocImpl.java:
|
||||||
|
(findSourceFiles(String)): Add type parameters.
|
||||||
|
* tools/gnu/classpath/tools/gjdoc/expr/Evaluator.java:
|
||||||
|
(evaluate(String,Set,EvaluatorEnvironment)): Add type parameters.
|
||||||
|
* tools/gnu/classpath/tools/gjdoc/expr/EvaluatorEnvironment.java:
|
||||||
|
(getValue(String,Set)): Add type parameters.
|
||||||
|
* tools/gnu/classpath/tools/gjdoc/expr/Type.java:
|
||||||
|
(clazz): Add type parameters.
|
||||||
|
(Type(Class)): Likewise.
|
||||||
|
* tools/gnu/classpath/tools/rmic/ClassRmicCompiler.java:
|
||||||
|
(keep): Remove unused field.
|
||||||
|
(errors): Add type parameter.
|
||||||
|
(compile): Remove unused field.
|
||||||
|
(classpath): Likewise.
|
||||||
|
(clazz): Add type parameter.
|
||||||
|
(mRemoteInterfaces): Likewise.
|
||||||
|
(run(String[])): Add type parameters.
|
||||||
|
(processClass(String)): Likewise.
|
||||||
|
(getException()): Remove unnecessary cast.
|
||||||
|
(typeArray(Class[])): Add type parameter.
|
||||||
|
(param(Method,int)): Add type parameter. Use Integer.valueOf.
|
||||||
|
(generateClassConstant(MethodVisitor,Class)): Add type parameters.
|
||||||
|
(generateClassArray(MethodVisitor,Class)): Likewise.
|
||||||
|
(generateStub()): Remove unused variables stubclassname, size
|
||||||
|
& endReturnTryCatch. Remove unnecessary casts and add type
|
||||||
|
parameters.
|
||||||
|
(generateSkel()): Remove unused variable skelclassname.
|
||||||
|
Use Long.valueOf.
|
||||||
|
(generateMethodSkel(MethodVisitor,Method,Variables)):
|
||||||
|
Add type parameters.
|
||||||
|
(typeArg(Class)): Add type parameter.
|
||||||
|
(readMethod(Class)): Likewise.
|
||||||
|
(writeMethod(Class)): Likewise.
|
||||||
|
(returnOpcode(Class)): Likewise.
|
||||||
|
(loadOpcode(Class)): Likewise.
|
||||||
|
(storeOpcode(Class)): Likewise.
|
||||||
|
(unboxMethod(Class)): Likewise.
|
||||||
|
(box(Class)): Likewise.
|
||||||
|
(size(Class)): Likewise.
|
||||||
|
(sortExceptions(Class[])): Add type parameters.
|
||||||
|
(setup(boolean,boolean,boolean,boolean,boolean,boolean,
|
||||||
|
boolean,boolean,boolean,boolean,String,String,String,String)):
|
||||||
|
Remove unused variables keep & classpath.
|
||||||
|
(findRemoteMethods()): Add type parameters.
|
||||||
|
(MethodRef.exceptions): Add type parameter.
|
||||||
|
(MethodRef.removeSubclasses(Class[])): Add type parameters.
|
||||||
|
(MethodRef.intersectExceptions(Method)): Likewise.
|
||||||
|
* tools/gnu/classpath/tools/rmic/Main.java:
|
||||||
|
(backends): Add type parameter.
|
||||||
|
(run(String[])): Remove redundant cast.
|
||||||
|
* tools/gnu/classpath/tools/rmic/RmiMethodGenerator.java:
|
||||||
|
(getArgumentList()): Add type parameters.
|
||||||
|
(getArgumentNames()): Likewise.
|
||||||
|
(getThrows()): Likewise.
|
||||||
|
(getStaticMethodDeclarations()): Likewise.
|
||||||
|
* tools/gnu/classpath/tools/rmic/SourceGiopRmicCompiler.java:
|
||||||
|
Add type parameter to Comparable.
|
||||||
|
(implementedRemotes): Add type parameter.
|
||||||
|
(extraImports): Likewise.
|
||||||
|
(methods): Likewise.
|
||||||
|
(interfaces): Likewise.
|
||||||
|
(compile(Class)): Add type parameters.
|
||||||
|
(getId(Class)): Add type parameter.
|
||||||
|
(getIdList(Collection)): Add type parameters.
|
||||||
|
(generateStub()): Add type parameters.
|
||||||
|
(generateTie()): Likewise.
|
||||||
|
(compare(AbstractMethodGenerator,AbstractMethodGenerator)): Use
|
||||||
|
more specific types.
|
||||||
|
(getImportStatements()): Add type parameters.
|
||||||
|
* tools/gnu/classpath/tools/rmic/Variables.java:
|
||||||
|
(free): Add type parameter.
|
||||||
|
(names): Add type parameters.
|
||||||
|
(wides): Add type parameter.
|
||||||
|
(declared): Likewise.
|
||||||
|
(allocateNow(Object,int)): Use Integer.valueOf.
|
||||||
|
(allocate(Object,int)): Add type parameters.
|
||||||
|
(deallocate(Object)): Remove redundant cast.
|
||||||
|
Use Integer.valueOf.
|
||||||
|
(get(Object)): Remove redundant cast.
|
||||||
|
|
||||||
2012-08-09 Dodji Seketeli <dodji@redhat.com>
|
2012-08-09 Dodji Seketeli <dodji@redhat.com>
|
||||||
|
|
||||||
Use accessor functions to manipulate xmlOutputBuffer
|
Use accessor functions to manipulate xmlOutputBuffer
|
||||||
* native/jni/xmlj/xmlj_io.c (GET_XML_OUTPUT_BUFFER_CONTENT)
|
* native/jni/xmlj/xmlj_io.c (GET_XML_OUTPUT_BUFFER_CONTENT)
|
||||||
(GET_XML_OUTPUT_BUFFER_SIZE): New macros.
|
(GET_XML_OUTPUT_BUFFER_SIZE): New macros.
|
||||||
(xmljOutputWriteCallback): Use them.
|
(xmljOutputWriteCallback): Use them.
|
||||||
|
|
||||||
2012-03-08 Andrew John Hughes <ahughes@redhat.com>
|
2012-08-09 Andrew John Hughes <gnu_andrew@member.fsf.org>
|
||||||
|
|
||||||
* NEWS: Set correct release date.
|
* java/util/TimeZone.java:
|
||||||
* configure.ac: Bump to 0.99 proper.
|
(defaultZone()): Use parameterized PrivilegedAction.
|
||||||
|
(aliases0): Add type parameters.
|
||||||
|
(timezones0); Likewise.
|
||||||
|
(timezones()): Likewise.
|
||||||
|
(getDateParams(String)): Fix indenting.
|
||||||
|
(getTimeZoneInternal(String)): Remove redundant casts.
|
||||||
|
(getAvailableIDs(int)): Add type parameters.
|
||||||
|
(getAvailableIDs(File,String,ArrayList)): Likewise.
|
||||||
|
(getAvailableIDs()): Likewise.
|
||||||
|
|
||||||
|
2012-07-03 Andrew John Hughes <gnu_andrew@member.fsf.org>
|
||||||
|
|
||||||
|
Update copyright headers throughout.
|
||||||
|
* gnu/java/text/AttributedFormatBuffer.java:
|
||||||
|
(ranges): Add generic type information.
|
||||||
|
(attributes): Likewise.
|
||||||
|
(aRanges): Rename from a_ranges.
|
||||||
|
(aAttributes): Add generic type information and
|
||||||
|
rename from a_attributes. Convert to a list of
|
||||||
|
maps rather than an array for type safety.
|
||||||
|
(defaultAttr): Replace prefix with static import.
|
||||||
|
(AttributedFormatBuffer(CPStringBuilder): Add generic
|
||||||
|
typing.
|
||||||
|
(addAttribute(int,Attribute)): Drop prefix, rename
|
||||||
|
new_range to newRange. Add generic types.
|
||||||
|
Use Integer.valueOf in place of new Integer.
|
||||||
|
(append(String,Attribute)): Drop prefix.
|
||||||
|
(append(String,int[],List)): Replace array with list.
|
||||||
|
Use Integer.valueOf instead of new Integer.
|
||||||
|
(append(char,Attribute)): Drop prefix.
|
||||||
|
(setDefaultAttribute(Attribute)): Likewise.
|
||||||
|
(getDefaultAttribute()): Likewise.
|
||||||
|
(sync()): Rename a_ranges to aRanges. Drop unneeded casts.
|
||||||
|
Replace array with list.
|
||||||
|
(getRanges()): Rename a_ranges to aRanges.
|
||||||
|
(getAttributes()): Replace map with list. Rename a_attributes
|
||||||
|
to aAttributes.
|
||||||
|
* gnu/java/text/FormatBuffer.java:
|
||||||
|
Add static import for Attribute.
|
||||||
|
* gnu/java/text/FormatCharacterIterator.java:
|
||||||
|
(attributes): Replace array with list.
|
||||||
|
(FormatCharacterIterator()): Likewise.
|
||||||
|
(FormatCharacterIterator(String,int,List)): Switch from
|
||||||
|
array to list. Update documentation.
|
||||||
|
(getAllAttributeKeys()): Add generic type. Switch
|
||||||
|
from array to list.
|
||||||
|
(getAttributes()): Likewise.
|
||||||
|
(getAttribute(Attribute)): Likewise.
|
||||||
|
(getRunLimit(Set)): Likewise.
|
||||||
|
(getRunLimit(Attribute)): Likewise.
|
||||||
|
(getRunStart(Set)): Likewise.
|
||||||
|
(getRunStart(Attribute)): Likewise.
|
||||||
|
(mergeAttributes(List,int[])): Likewise. Use List
|
||||||
|
in preference to Vector. Use newRanges & newAttributes
|
||||||
|
rather than new_ranges and new_attributes.
|
||||||
|
(append(AttributedCharacterIterator)): Likewise.
|
||||||
|
(append(String,HashMap)): Likewise.
|
||||||
|
(addAttributes(Map,int,int)): Likewise.
|
||||||
|
(dumpTable()): Use startRange instead of start_range.
|
||||||
|
Add generic types.
|
||||||
|
* gnu/java/text/StringFormatBuffer.java,
|
||||||
|
Add static import for Attribute.
|
||||||
|
* java/text/AttributedString.java:
|
||||||
|
Add static import for Attribute.
|
||||||
|
(attribs): Add generic type.
|
||||||
|
(AttributeRange(Map,int,int)): Likewise.
|
||||||
|
(AttributedString(String,Map)): Likewise.
|
||||||
|
(AttributedString(AttributedCharacterIterator, int, int,
|
||||||
|
Attribute)): Drop prefix, add generic types.
|
||||||
|
(addAttribute(Attribute,Object)): Drop prefix.
|
||||||
|
(addAttribute(Attribute,Object,int,int)): Likewise
|
||||||
|
and add generic types.
|
||||||
|
(addAttributes(Map,int,int)): Add generic types.
|
||||||
|
(getIterator(Attribute)): Drop prefix.
|
||||||
|
(getIterator(Attribute[])): Likewise.
|
||||||
|
* java/text/AttributedStringIterator.java:
|
||||||
|
Add static import for Attribute.
|
||||||
|
(getAllAttributeKeys()): Add generic type.
|
||||||
|
(getRunLimit(Attribute)): Add generic type, drop
|
||||||
|
prefix.
|
||||||
|
(getRunLimit(Set)): Add generic types.
|
||||||
|
(getRunStart(Attribute)): Add generic type, drop
|
||||||
|
prefix.
|
||||||
|
(getRunStart(Set)): Add generic types.
|
||||||
|
(getAttributes()): Likewise.
|
||||||
|
* java/text/Bidi.java:
|
||||||
|
(formatterIndices): Add generic type.
|
||||||
|
(reinsertFormattingCodes()): Drop redundant cast.
|
||||||
|
* java/text/BreakIterator.java:
|
||||||
|
(getInstance(String,Locale)): Add generic type to Class.
|
||||||
|
* java/text/ChoiceFormat.java:
|
||||||
|
(stringVec): Add generic type.
|
||||||
|
(limitVec): Likewise.
|
||||||
|
(applyPattern(String)): Remove redundant cast.
|
||||||
|
* java/text/CollationElementIterator.java:
|
||||||
|
(textDecomposition): Renamed from text_decomposition.
|
||||||
|
(textIndexes): Renamed from text_indexes.
|
||||||
|
(setText(String)): Add generic types. Rename a_element
|
||||||
|
to aElement. Rename a_idx to aIdx. Rename key_old to
|
||||||
|
keyOld. Use Integer.valueOf rather than new Integer.
|
||||||
|
* java/text/DecimalFormat.java:
|
||||||
|
(attributes): Add generic type.
|
||||||
|
(formatToCharacterIterator(Object)): Remove redundant cast.
|
||||||
|
* java/text/MessageFormat.java:
|
||||||
|
(Field()): Remove unneeded warning suppression.
|
||||||
|
* java/text/NumberFormat.java:
|
||||||
|
(Field()): Likewise.
|
||||||
|
|
||||||
|
2012-07-01 Andrew John Hughes <ahughes@redhat.com>
|
||||||
|
|
||||||
|
PR classpath/44052
|
||||||
|
* java/text/DateFormatSymbols.java:
|
||||||
|
(DFSData): Inner immutable class for storing parsed
|
||||||
|
locale data.
|
||||||
|
(DFSData.DFSData(String[],String[],String,String[],
|
||||||
|
String[],String[],String[],String[],String[],
|
||||||
|
String[][])): Constructor to initialise a new instance
|
||||||
|
with property data.
|
||||||
|
(DFSData.getAMPMs()): Return a clone of the ampms array.
|
||||||
|
(DFSData.getEras()): Likewise for eras.
|
||||||
|
(DFSData.getLocalPatternChars()): Return the local pattern
|
||||||
|
characters.
|
||||||
|
(DFSData.getMonths()): Return a clone of the (long) months
|
||||||
|
array.
|
||||||
|
(DFSData.getShortMonths()): Likewise for the short months array.
|
||||||
|
(DFSData.getWeekdays()): Likewise for (long) weekdays.
|
||||||
|
(DFSData.getShortWeekdays()): Likewise for short weekdays.
|
||||||
|
(DFSData.getDateFormats()): Likewise for date formats.
|
||||||
|
(DFSData.getTimeFormats()): Likewise for time formats.
|
||||||
|
(DFSData.getZoneStrings()): Likewise for zone strings.
|
||||||
|
(dataCache): Cache of parsed locale data.
|
||||||
|
(getZoneStrings(List<ResourceBundle>,Locale)):
|
||||||
|
Make static so it can be called by retrieveData.
|
||||||
|
(formatsForKey(List<ResourceBundle>,String)):
|
||||||
|
Likewise.
|
||||||
|
(getString(List<ResourceBundle>, String)): Likewise.
|
||||||
|
(retrieveData(Locale)): Separate out retrieval of
|
||||||
|
locale data from constructor and store it in the cache.
|
||||||
|
(DateFormatSymbols(Locale)): Modify to call retrieveData
|
||||||
|
and set fields from the returned DFSData instance.
|
||||||
|
|
||||||
|
2012-05-30 Andrew John Hughes <ahughes@redhat.com>
|
||||||
|
|
||||||
|
* java/text/DateFormatSymbols.java:
|
||||||
|
(getZoneStrings(List<ResourceBundle>, Locale)):
|
||||||
|
Refactor to use existing list of resource bundles.
|
||||||
|
(formatsForKey(List<ResourceBundle>, String)):
|
||||||
|
Likewise and use new local getString method.
|
||||||
|
(getString(List<ResourceBundle>, String)):
|
||||||
|
Use first available String from most-specific locale
|
||||||
|
rather than the least-specific.
|
||||||
|
(DateFormatSymbols(Locale)): Use bundles for resolving
|
||||||
|
localPatternChars, dateFormats, timeFormats and runtimeZoneStrings
|
||||||
|
as well.
|
||||||
|
|
||||||
|
2012-05-04 Andrew John Hughes <ahughes@redhat.com>
|
||||||
|
|
||||||
|
* native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontPeer.c,
|
||||||
|
(font_map): Renamed from ft2_map.
|
||||||
|
(Java_gnu_java_awt_peer_gtk_GdkFontPeer_initStaticState(JNIEnv,
|
||||||
|
jclass)): Remove cast to pango_ft2_font_map_new.
|
||||||
|
(Java_gnu_java_awt_peer_gtk_GdKFontPeer_setFont(JNIEnv,
|
||||||
|
jobject,jstring,jint,jint)): Call pango_font_map_create_context
|
||||||
|
rather than deprecated pango_ft2_font_map_create_context.
|
||||||
|
|
||||||
|
2012-05-01 Andrew John Hughes <ahughes@redhat.com>
|
||||||
|
|
||||||
|
* java/text/DateFormatSymbols.java:
|
||||||
|
Rename U00AE and U000A9 as the more memorable
|
||||||
|
FIELD_SPLIT and ZONE_SPLIT respectively.
|
||||||
|
* THANKYOU: Add Andreas Sewe.
|
||||||
|
|
||||||
|
2012-04-30 Andreas Sewe <sewe@st.informatik.tu-darmstadt.de>
|
||||||
|
|
||||||
|
PR classpath/53171
|
||||||
|
* java/text/DateFormatSymbols.java:
|
||||||
|
(U00A9): Pre-compile pattern for zone separation.
|
||||||
|
(U00AE): Likewise for fields.
|
||||||
|
(getStringArray(List,String,int,String)): Use U00AE.split
|
||||||
|
in place of String.split.
|
||||||
|
(getZoneStrings(ResourceBundle,Locale)): Use U00AE.split
|
||||||
|
and U00A9.split in place of String.split.
|
||||||
|
|
||||||
|
2012-04-25 Andrew John Hughes <ahughes@redhat.com>
|
||||||
|
|
||||||
|
Update warning suppression so it still works
|
||||||
|
with newer compilers.
|
||||||
|
* javax/activation/ActivationDataFlavor.java:
|
||||||
|
(ActivationDataFlavor(Class,String,String)): Suppress
|
||||||
|
rawtypes not unchecked.
|
||||||
|
(ActivationDataFlavor(Class,String)): Likewise.
|
||||||
|
(getRepresentationClass()): Likewise.
|
||||||
|
* javax/activation/MimeTypeParameterList.java:
|
||||||
|
(getNames()): Likewise.
|
||||||
|
* javax/management/DefaultLoaderRepository.java:
|
||||||
|
(loadClass(String)): Likewise.
|
||||||
|
(loadClassWithout(ClassLoader,String)): Likewise.
|
||||||
|
* javax/management/MBeanConstructorInfo.java:
|
||||||
|
(MBeanConstructorInof(String,Constructor)): Likewise.
|
||||||
|
* javax/management/remote/rmi/RMIConnection.java:
|
||||||
|
(addNotificationListener(ObjectName,ObjectName,MarshelledObject,
|
||||||
|
MarshelledObject,Subject)): Likewise.
|
||||||
|
(addNotificationListeners(ObjectName[],MarshelledObject[], Subject[])):
|
||||||
|
Likewise.
|
||||||
|
(createMBean(String,ObjectName,MarshalledObject,String,Subject)): Likewise.
|
||||||
|
(createMBean(String,ObjectName,ObjectName,MarshalledObject,String[],Subject)):
|
||||||
|
Likewise.
|
||||||
|
(invoke(ObjectName,String,MarshalledObject,String[],Subject)): Likewise.
|
||||||
|
(queryMBeans(ObjectName,MarshalledObject,Subject)): Likewise.
|
||||||
|
(queryNames(ObjectName,MarshalledObject,Subject)): Likewise.
|
||||||
|
(removeNotificationListener(ObjectName,ObjectName,MarshalledObject,
|
||||||
|
MarshalledObject,Subject)): Likewise.
|
||||||
|
(setAttribute(ObjectName,MarshalledObject,Subject)): Likewise.
|
||||||
|
(setAttributes(ObjectName,MarshalledObject,Subject)): Likewise.
|
||||||
|
* javax/swing/tree/DefaultMutableTreeNode.java:
|
||||||
|
(children()): Likewise.
|
||||||
|
(preorderEnumeration()): Likewise.
|
||||||
|
(postorderEnumeration()): Likewise.
|
||||||
|
(breadthFirstEnumeration()): Likewise.
|
||||||
|
(depthFirstEnumeration()): Likewise.
|
||||||
|
(pathFromAncestorEnumeration(TreeNode)): Likewise.
|
||||||
|
(BreadthFirstEnumeration.nextElement()): Move annotation down to assignment level.
|
||||||
|
(PreorderEnumeration.PreorderEnumeration(TreeNode)): Likewise.
|
||||||
|
(PreorderEnumeration.traverse(Enumeration)): Likewise.
|
||||||
|
(PostorderEnumeration.PostorderEnumeration(TreeNode)): Likewise.
|
||||||
|
(PostorderEnumeration.traverse(Enumeration()): Likewise.
|
||||||
|
* javax/swing/tree/TreeNode.java:
|
||||||
|
(children()): Suppress rawtypes not unchecked.
|
||||||
|
* javax/xml/namespace/NamespaceContext.java:
|
||||||
|
(getPrefixes(String)): Likewise.
|
||||||
|
* javax/xml/stream/XMLEventFactory.java:
|
||||||
|
(createStartElement(QName,Iterator,Iterator)): Likewise.
|
||||||
|
(createStartElement(String,String,String,Iterator,Iterator)): Likewise.
|
||||||
|
(createStartElement(String,String,String,Iterator,Iterator,NamespaceContext)):
|
||||||
|
Likewise.
|
||||||
|
(createEndElement(QName,Iterator)): Likewise.
|
||||||
|
(createEndElement(String,String,String,Iterator)): Likewise.
|
||||||
|
* javax/xml/stream/XMLEventReader.java: Likewise (at class level
|
||||||
|
due to inheritance).
|
||||||
|
* javax/xml/stream/events/DTD.java:
|
||||||
|
(getNotations()): Likewise.
|
||||||
|
(getEntities()): Likewise.
|
||||||
|
* javax/xml/stream/events/EndElement.java:
|
||||||
|
(getNamespaces()): Likewise.
|
||||||
|
* javax/xml/stream/events/StartElement.java:
|
||||||
|
(getAttributes()): Likewise.
|
||||||
|
(getNamespaces()): Likewise.
|
||||||
|
* javax/xml/xpath/XPathFunction.java:
|
||||||
|
(evaluate(List)): Likewise.
|
||||||
|
* org/omg/CORBA/LocalObject.java:
|
||||||
|
(_servant_preinvoke(String,Class)): Likewise.
|
||||||
|
* org/omg/CORBA/portable/Delegate.java:
|
||||||
|
(servant_preinvoke(org.omg.CORBA.Object,String,Class)): Likewise.
|
||||||
|
* org/omg/CORBA/portable/InputStream.java:
|
||||||
|
(read_Object(Class)): Likewise.
|
||||||
|
* org/omg/CORBA/portable/ObjectImpl.java:
|
||||||
|
(_servant_preinvoke(String,Class)): Likewise.
|
||||||
|
* org/omg/CORBA_2_3/portable/InputStream.java:
|
||||||
|
(read_abstract_interface(Class)): Likewise.
|
||||||
|
(read_value(Class)): Likewise.
|
||||||
|
* org/omg/CORBA_2_3/portable/OutputStream.java:
|
||||||
|
(write_value(Serializable,Class)): Likewise.
|
||||||
|
* org/omg/DynamicAny/_DynAnyFactoryStub.java:
|
||||||
|
(_opsClass): Likewise.
|
||||||
|
* org/omg/DynamicAny/_DynAnyStub.java:
|
||||||
|
(_opsClass): Likewise.
|
||||||
|
* org/omg/DynamicAny/_DynArrayStub.java,
|
||||||
|
(_opsClass): Likewise.
|
||||||
|
* org/omg/DynamicAny/_DynEnumStub.java,
|
||||||
|
(_opsClass): Likewise.
|
||||||
|
* org/omg/DynamicAny/_DynFixedStub.java,
|
||||||
|
(_opsClass): Likewise.
|
||||||
|
* org/omg/DynamicAny/_DynSequenceStub.java,
|
||||||
|
(_opsClass): Likewise.
|
||||||
|
* org/omg/DynamicAny/_DynStructStub.java,
|
||||||
|
(_opsClass): Likewise.
|
||||||
|
* org/omg/DynamicAny/_DynUnionStub.java,
|
||||||
|
(_opsClass): Likewise.
|
||||||
|
* org/omg/DynamicAny/_DynValueStub.java,
|
||||||
|
(_opsClass): Likewise.
|
||||||
|
* org/omg/PortableServer/_ServantActivatorStub.java,
|
||||||
|
(_opsClass): Likewise.
|
||||||
|
* org/omg/PortableServer/_ServantLocatorStub.java,
|
||||||
|
(_opsClass): Likewise.
|
||||||
|
|
||||||
|
2012-04-24 Andrew John Hughes <ahughes@redhat.com>
|
||||||
|
|
||||||
|
* native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c:
|
||||||
|
(Java_gnu_java_awt_peer_gtk_GtkImage_freePixbuf):
|
||||||
|
Use g_object_unref rather than deprecated gdk_pixbuf_unref
|
||||||
|
to avoid warning.
|
||||||
|
|
||||||
|
2012-04-03 Andrew John Hughes <ahughes@redhat.com>
|
||||||
|
|
||||||
|
* .gitignore: Renamed from .cvsignore.
|
||||||
|
|
||||||
|
2012-01-01 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* gnu/java/rmi/registry/RegistryImpl.java (version): Update
|
||||||
|
copyright notice dates.
|
||||||
|
* tools/gnu/classpath/tools/orbd/Main.java (run): Likewise.
|
||||||
|
|
||||||
|
2007-02-26 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* java/util/TimeZone.java (getDefaultDisplayName): Don't
|
||||||
|
check if TimeZone is instanceof SimpleTimeZone.
|
||||||
|
|
||||||
|
2006-09-13 Andrew Haley <aph@redhat.com>
|
||||||
|
|
||||||
|
* java/util/PriorityQueue.java: Throw IllegalArgumentException for
|
||||||
|
capacity < 1.
|
||||||
|
(Iterator.remove()): Decrement index after removing element.
|
||||||
|
|
||||||
|
2007-02-14 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
Andrew Haley <aph@redhat.com>
|
||||||
|
|
||||||
|
* java/util/TimeZone.java (getDateParams): Negate dayOfWeek.
|
||||||
|
|
||||||
|
2012-03-22 Andrew John Hughes <ahughes@redhat.com>
|
||||||
|
|
||||||
|
* java/util/regex/Matcher.java:
|
||||||
|
(usePattern(Pattern)): Implemented.
|
||||||
|
|
||||||
|
2012-03-25 Gerald Pfeifer <gerald@pfeifer.com>
|
||||||
|
|
||||||
|
PR libgcj/52694
|
||||||
|
* native/jni/java-io/java_io_VMConsole.c (IUCLC): Define, if
|
||||||
|
undefined.
|
||||||
|
|
||||||
|
2012-03-16 Andrew John Hughes <ahughes@redhat.com>
|
||||||
|
|
||||||
|
* NEWS: Add key along the same lines
|
||||||
|
as IcedTea.
|
||||||
|
|
||||||
|
2012-03-12 Pekka Enberg <penberg@kernel.org>
|
||||||
|
|
||||||
|
* gnu/java/nio/FileLockImpl.java,
|
||||||
|
* java/beans/XMLDecoder.java,
|
||||||
|
* java/beans/XMLEncoder.java,
|
||||||
|
* java/io/Closeable.java,
|
||||||
|
* java/io/ObjectInput.java,
|
||||||
|
* java/io/ObjectOutput.java,
|
||||||
|
* java/lang/AutoCloseable.java,
|
||||||
|
* java/nio/channels/FileLock.java,
|
||||||
|
* java/sql/Connection.java,
|
||||||
|
* java/sql/ResultSet.java,
|
||||||
|
* java/sql/Statement.java,
|
||||||
|
* javax/sound/midi/MidiDevice.java,
|
||||||
|
* javax/sound/midi/Receiver.java,
|
||||||
|
* javax/sound/midi/Transmitter.java,
|
||||||
|
* javax/sound/sampled/Line.java:
|
||||||
|
Add missing interface.
|
||||||
|
|
||||||
|
2012-03-12 Pekka Enberg <penberg@kernel.org>
|
||||||
|
|
||||||
|
* java/lang/reflect/Modifier.java:
|
||||||
|
(classModifiers): Add missing method.
|
||||||
|
(interfaceModifiers): Add missing method.
|
||||||
|
(constructorModifiers): Add missing method.
|
||||||
|
(methodModifiers): Add missing method.
|
||||||
|
(fieldModifiers): Add missing method.
|
||||||
|
|
||||||
|
2012-03-12 Pekka Enberg <penberg@kernel.org>
|
||||||
|
|
||||||
|
* java/lang/ClassNotFoundException,
|
||||||
|
* java/lang/IllegalAccessException.java,
|
||||||
|
* java/lang/InstantiationException.java,
|
||||||
|
* java/lang/NoSuchFieldException.java,
|
||||||
|
* java/lang/NoSuchMethodException.java,
|
||||||
|
* java/lang/ReflectiveOperationException.java,
|
||||||
|
* java/lang/reflect/InvocationTargetException.java:
|
||||||
|
Add ReflectiveOperationException class.
|
||||||
|
|
||||||
|
2012-03-12 Pekka Enberg <penberg@kernel.org>
|
||||||
|
|
||||||
|
* java/lang/AssertionError.java:
|
||||||
|
(AssertionError): Add missing constructor.
|
||||||
|
* java/lang/LinkageError.java:
|
||||||
|
(LinkageError): Add missing constructor.
|
||||||
|
|
||||||
|
2012-03-12 Pekka Enberg <penberg@kernel.org>
|
||||||
|
|
||||||
|
* java/lang/Boolean.java:
|
||||||
|
(compare): Add missing method.
|
||||||
|
* java/lang/Byte.java:
|
||||||
|
(compare): Add missing method.
|
||||||
|
* java/lang/Character.java:
|
||||||
|
(compare): Add missing method.
|
||||||
|
* java/lang/Integer.java:
|
||||||
|
(compare): Add missing method.
|
||||||
|
* java/lang/Long.java:
|
||||||
|
(compare): Add missing method.
|
||||||
|
* java/lang/Short.java:
|
||||||
|
(compare): Add missing method.
|
||||||
|
|
||||||
|
2012-03-12 Pekka Enberg <penberg@kernel.org>
|
||||||
|
|
||||||
|
* java/lang/System.java:
|
||||||
|
(lineSeparator): Add missing method.
|
||||||
|
|
||||||
|
2012-03-12 Pekka Enberg <penberg@kernel.org>
|
||||||
|
|
||||||
|
* java/lang/reflect/Member.java:
|
||||||
|
(getDeclaringClass): Fix return type.
|
||||||
|
|
||||||
|
2012-03-07 Andrew John Hughes <ahughes@redhat.com>
|
||||||
|
|
||||||
|
* NEWS:
|
||||||
|
Add section for 1.0 release.
|
||||||
|
* configure.ac:
|
||||||
|
Bump to 1.0pre.
|
||||||
|
|
||||||
2012-03-07 Andrew John Hughes <ahughes@redhat.com>
|
2012-03-07 Andrew John Hughes <ahughes@redhat.com>
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2012-12-03 Matthias Klose <doko@ubuntu.com>
|
||||||
|
|
||||||
|
* configure.ac (AM_INIT_AUTOMAKE): Call with no-dist.
|
||||||
|
* m4/lib-ld.m4, m4/lib-link.m4,m4/lib-prefix.m4: New.
|
||||||
|
|
||||||
2012-05-16 H.J. Lu <hongjiu.lu@intel.com>
|
2012-05-16 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* configure: Regenerated.
|
* configure: Regenerated.
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
Installation Instructions
|
Installation Instructions
|
||||||
*************************
|
*************************
|
||||||
|
|
||||||
Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
|
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
|
||||||
Inc.
|
2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Copying and distribution of this file, with or without modification,
|
Copying and distribution of this file, with or without modification,
|
||||||
are permitted in any medium without royalty provided the copyright
|
are permitted in any medium without royalty provided the copyright
|
||||||
|
@ -226,11 +226,6 @@ order to use an ANSI C compiler:
|
||||||
|
|
||||||
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
||||||
|
|
||||||
HP-UX `make' updates targets which have the same time stamps as
|
|
||||||
their prerequisites, which makes it generally unusable when shipped
|
|
||||||
generated files such as `configure' are involved. Use GNU `make'
|
|
||||||
instead.
|
|
||||||
|
|
||||||
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
|
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
|
||||||
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
|
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
|
||||||
a workaround. If GNU CC is not installed, it is therefore recommended
|
a workaround. If GNU CC is not installed, it is therefore recommended
|
||||||
|
|
|
@ -36,11 +36,11 @@ host_triplet = @host@
|
||||||
target_triplet = @target@
|
target_triplet = @target@
|
||||||
subdir = .
|
subdir = .
|
||||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/../../compile \
|
DIST_COMMON = README $(am__configure_deps) $(srcdir)/../../compile \
|
||||||
$(srcdir)/../../config.guess $(srcdir)/../../config.sub \
|
$(srcdir)/../../config.guess $(srcdir)/../../config.rpath \
|
||||||
$(srcdir)/../../install-sh $(srcdir)/../../ltmain.sh \
|
$(srcdir)/../../config.sub $(srcdir)/../../install-sh \
|
||||||
$(srcdir)/../../missing $(srcdir)/../../mkinstalldirs \
|
$(srcdir)/../../ltmain.sh $(srcdir)/../../missing \
|
||||||
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
$(srcdir)/../../mkinstalldirs $(srcdir)/Makefile.am \
|
||||||
$(top_srcdir)/configure \
|
$(srcdir)/Makefile.in $(top_srcdir)/configure \
|
||||||
$(top_srcdir)/gnu/classpath/Configuration.java.in \
|
$(top_srcdir)/gnu/classpath/Configuration.java.in \
|
||||||
$(top_srcdir)/gnu/java/security/Configuration.java.in \
|
$(top_srcdir)/gnu/java/security/Configuration.java.in \
|
||||||
$(top_srcdir)/resource/META-INF/services/java.util.prefs.PreferencesFactory.in \
|
$(top_srcdir)/resource/META-INF/services/java.util.prefs.PreferencesFactory.in \
|
||||||
|
@ -57,9 +57,6 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/../../compile \
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
|
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
|
||||||
$(top_srcdir)/../../config/lead-dot.m4 \
|
$(top_srcdir)/../../config/lead-dot.m4 \
|
||||||
$(top_srcdir)/../../config/lib-ld.m4 \
|
|
||||||
$(top_srcdir)/../../config/lib-link.m4 \
|
|
||||||
$(top_srcdir)/../../config/lib-prefix.m4 \
|
|
||||||
$(top_srcdir)/../../config/multi.m4 \
|
$(top_srcdir)/../../config/multi.m4 \
|
||||||
$(top_srcdir)/../../config/no-executables.m4 \
|
$(top_srcdir)/../../config/no-executables.m4 \
|
||||||
$(top_srcdir)/../../config/override.m4 \
|
$(top_srcdir)/../../config/override.m4 \
|
||||||
|
@ -78,7 +75,9 @@ am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
|
||||||
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
||||||
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
|
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
|
||||||
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
|
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
|
||||||
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
|
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
|
||||||
|
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
|
||||||
|
$(top_srcdir)/configure.ac
|
||||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
$(ACLOCAL_M4)
|
$(ACLOCAL_M4)
|
||||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||||
|
@ -247,6 +246,7 @@ MAKEINFO = @MAKEINFO@
|
||||||
MKDIR = @MKDIR@
|
MKDIR = @MKDIR@
|
||||||
MKDIR_P = @MKDIR_P@
|
MKDIR_P = @MKDIR_P@
|
||||||
MOC = @MOC@
|
MOC = @MOC@
|
||||||
|
MOC4 = @MOC4@
|
||||||
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
|
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
|
||||||
MOZILLA_LIBS = @MOZILLA_LIBS@
|
MOZILLA_LIBS = @MOZILLA_LIBS@
|
||||||
NM = @NM@
|
NM = @NM@
|
||||||
|
|
|
@ -1,4 +1,27 @@
|
||||||
New in release 0.99 (Mar 08, 2012)
|
Key:
|
||||||
|
|
||||||
|
SX - http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=X
|
||||||
|
RHX - https://bugzilla.redhat.com/show_bug.cgi?id=X
|
||||||
|
DX - http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=X
|
||||||
|
GX - http://bugs.gentoo.org/show_bug.cgi?id=X
|
||||||
|
CAX - http://server.complang.tuwien.ac.at/cgi-bin/bugzilla/show_bug.cgi?id=X
|
||||||
|
LPX - https://bugs.launchpad.net/bugs/X
|
||||||
|
PRX - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=X
|
||||||
|
|
||||||
|
CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY
|
||||||
|
|
||||||
|
New in release 0.99.1 (XXX XX, 2012)
|
||||||
|
|
||||||
|
* Bug fixes:
|
||||||
|
- PR42134: NPE in java.text.Bidi
|
||||||
|
- PR54931: Classpath will not build docs with version of GJDoc included with itself
|
||||||
|
- PR54960: Avoid NullPointerException in SAXSerializer.
|
||||||
|
- PR42551: Avoid overwriting length of message when computing length representation.
|
||||||
|
- PR44208: Ensure a handle for the enum is registered before its constant.
|
||||||
|
- PR41689: javax.security.sasl.CREDIENTIALS field is missing
|
||||||
|
- PR55140: Addition of exception to codePointBefore breaks OpenJDK GenerateBreakIteratorData tool
|
||||||
|
|
||||||
|
New in release 0.99 (Feb 15, 2012)
|
||||||
|
|
||||||
* Addition of java.util.regex.Pattern.quote.
|
* Addition of java.util.regex.Pattern.quote.
|
||||||
* Addition of java.io.IOError.
|
* Addition of java.io.IOError.
|
||||||
|
|
|
@ -15,6 +15,7 @@ Moses DeJong (dejong@cs.umn.edu)
|
||||||
Patrick Doyle (doylep@eecg.toronto.edu)
|
Patrick Doyle (doylep@eecg.toronto.edu)
|
||||||
Julian Dolby (dolby@us.ibm.com)
|
Julian Dolby (dolby@us.ibm.com)
|
||||||
Raimar Falke (hawk@hawk.shef.ac.uk)
|
Raimar Falke (hawk@hawk.shef.ac.uk)
|
||||||
|
Paul Fernhout (pdfernhout@kurtz-fernhout.com)
|
||||||
Philip Fong (pwlfong@users.sourceforge.net)
|
Philip Fong (pwlfong@users.sourceforge.net)
|
||||||
Jeroen Frijters (jeroen@sumatra.nl)
|
Jeroen Frijters (jeroen@sumatra.nl)
|
||||||
Etienne M. Gagnon (etienne.gagnon@uqam.ca)
|
Etienne M. Gagnon (etienne.gagnon@uqam.ca)
|
||||||
|
@ -43,6 +44,8 @@ Petter Reinholdtsen (pere@hungry.com)
|
||||||
Julian Scheid (julian.scheid@sektor37.de)
|
Julian Scheid (julian.scheid@sektor37.de)
|
||||||
Martin Schröder (ms@artcom-gmbh.de)
|
Martin Schröder (ms@artcom-gmbh.de)
|
||||||
Robert Schuster (robertschuster@fsfe.org)
|
Robert Schuster (robertschuster@fsfe.org)
|
||||||
|
Andreas Sewe (sewe@st.informatik.tu-darmstadt.de)
|
||||||
|
Jeremy Singer (Jeremy.Singer@glasgow.ac.uk)
|
||||||
Gaute Smaaland (gs@sevenmountains.no)
|
Gaute Smaaland (gs@sevenmountains.no)
|
||||||
Michael Smith (msmith@spinnakernet.com)
|
Michael Smith (msmith@spinnakernet.com)
|
||||||
J. Russell Smyth (drfish@uswest.net)
|
J. Russell Smyth (drfish@uswest.net)
|
||||||
|
@ -50,6 +53,7 @@ Ian D. Stewart (idstewart@softhome.net)
|
||||||
Jeff Sturm (jsturm@one-point.com)
|
Jeff Sturm (jsturm@one-point.com)
|
||||||
Sreenivas Subramoney (sreenivas.subramoney@intel.com)
|
Sreenivas Subramoney (sreenivas.subramoney@intel.com)
|
||||||
Chris Toshok (toshok@hungry.com)
|
Chris Toshok (toshok@hungry.com)
|
||||||
|
Paul Viney (paul@diasoft.nl)
|
||||||
Weldon Washburn (weldon.washburn@intel.com)
|
Weldon Washburn (weldon.washburn@intel.com)
|
||||||
Adam Welc (welc@cs.purdue.edu)
|
Adam Welc (welc@cs.purdue.edu)
|
||||||
Gansha Wu (gansha.wu@intel.com)
|
Gansha Wu (gansha.wu@intel.com)
|
||||||
|
|
|
@ -1062,9 +1062,6 @@ AC_SUBST([am__untar])
|
||||||
|
|
||||||
m4_include([../../config/depstand.m4])
|
m4_include([../../config/depstand.m4])
|
||||||
m4_include([../../config/lead-dot.m4])
|
m4_include([../../config/lead-dot.m4])
|
||||||
m4_include([../../config/lib-ld.m4])
|
|
||||||
m4_include([../../config/lib-link.m4])
|
|
||||||
m4_include([../../config/lib-prefix.m4])
|
|
||||||
m4_include([../../config/multi.m4])
|
m4_include([../../config/multi.m4])
|
||||||
m4_include([../../config/no-executables.m4])
|
m4_include([../../config/no-executables.m4])
|
||||||
m4_include([../../config/override.m4])
|
m4_include([../../config/override.m4])
|
||||||
|
@ -1085,4 +1082,7 @@ m4_include([m4/ax_create_stdint_h.m4])
|
||||||
m4_include([m4/ax_func_which_gethostbyname_r.m4])
|
m4_include([m4/ax_func_which_gethostbyname_r.m4])
|
||||||
m4_include([m4/gcc_attribute.m4])
|
m4_include([m4/gcc_attribute.m4])
|
||||||
m4_include([m4/iconv.m4])
|
m4_include([m4/iconv.m4])
|
||||||
|
m4_include([m4/lib-ld.m4])
|
||||||
|
m4_include([m4/lib-link.m4])
|
||||||
|
m4_include([m4/lib-prefix.m4])
|
||||||
m4_include([m4/pkg.m4])
|
m4_include([m4/pkg.m4])
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
# Configuration validation subroutine script.
|
# Configuration validation subroutine script.
|
||||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||||
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
||||||
# 2011 Free Software Foundation, Inc.
|
# 2011, 2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
timestamp='2011-10-29'
|
timestamp='2012-04-18'
|
||||||
|
|
||||||
# This file is (in principle) common to ALL GNU software.
|
# This file is (in principle) common to ALL GNU software.
|
||||||
# The presence of a machine in this file suggests that SOME GNU software
|
# The presence of a machine in this file suggests that SOME GNU software
|
||||||
|
@ -21,9 +21,7 @@ timestamp='2011-10-29'
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
|
|
||||||
# 02110-1301, USA.
|
|
||||||
#
|
#
|
||||||
# As a special exception to the GNU General Public License, if you
|
# As a special exception to the GNU General Public License, if you
|
||||||
# distribute this file as part of a program that contains a
|
# distribute this file as part of a program that contains a
|
||||||
|
@ -76,8 +74,8 @@ version="\
|
||||||
GNU config.sub ($timestamp)
|
GNU config.sub ($timestamp)
|
||||||
|
|
||||||
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||||
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
|
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
||||||
Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This is free software; see the source for copying conditions. There is NO
|
This is free software; see the source for copying conditions. There is NO
|
||||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
|
||||||
|
@ -132,6 +130,10 @@ case $maybe_os in
|
||||||
os=-$maybe_os
|
os=-$maybe_os
|
||||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||||
;;
|
;;
|
||||||
|
android-linux)
|
||||||
|
os=-linux-android
|
||||||
|
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
|
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
|
||||||
if [ $basic_machine != $1 ]
|
if [ $basic_machine != $1 ]
|
||||||
|
@ -223,6 +225,12 @@ case $os in
|
||||||
-isc*)
|
-isc*)
|
||||||
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
|
||||||
;;
|
;;
|
||||||
|
-lynx*178)
|
||||||
|
os=-lynxos178
|
||||||
|
;;
|
||||||
|
-lynx*5)
|
||||||
|
os=-lynxos5
|
||||||
|
;;
|
||||||
-lynx*)
|
-lynx*)
|
||||||
os=-lynxos
|
os=-lynxos
|
||||||
;;
|
;;
|
||||||
|
@ -247,6 +255,7 @@ case $basic_machine in
|
||||||
# Some are omitted here because they have special meanings below.
|
# Some are omitted here because they have special meanings below.
|
||||||
1750a | 580 \
|
1750a | 580 \
|
||||||
| a29k \
|
| a29k \
|
||||||
|
| aarch64 | aarch64_be \
|
||||||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
|
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
|
||||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
|
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
|
||||||
| am33_2.0 \
|
| am33_2.0 \
|
||||||
|
@ -319,8 +328,7 @@ case $basic_machine in
|
||||||
c6x)
|
c6x)
|
||||||
basic_machine=tic6x-unknown
|
basic_machine=tic6x-unknown
|
||||||
;;
|
;;
|
||||||
m6811 | m68hc11 | m6812 | m68hc12 | picochip)
|
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
|
||||||
# Motorola 68HC11/12.
|
|
||||||
basic_machine=$basic_machine-unknown
|
basic_machine=$basic_machine-unknown
|
||||||
os=-none
|
os=-none
|
||||||
;;
|
;;
|
||||||
|
@ -333,7 +341,10 @@ case $basic_machine in
|
||||||
strongarm | thumb | xscale)
|
strongarm | thumb | xscale)
|
||||||
basic_machine=arm-unknown
|
basic_machine=arm-unknown
|
||||||
;;
|
;;
|
||||||
|
xgate)
|
||||||
|
basic_machine=$basic_machine-unknown
|
||||||
|
os=-none
|
||||||
|
;;
|
||||||
xscaleeb)
|
xscaleeb)
|
||||||
basic_machine=armeb-unknown
|
basic_machine=armeb-unknown
|
||||||
;;
|
;;
|
||||||
|
@ -356,6 +367,7 @@ case $basic_machine in
|
||||||
# Recognize the basic CPU types with company name.
|
# Recognize the basic CPU types with company name.
|
||||||
580-* \
|
580-* \
|
||||||
| a29k-* \
|
| a29k-* \
|
||||||
|
| aarch64-* | aarch64_be-* \
|
||||||
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
|
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
|
||||||
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
|
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
|
||||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
|
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
|
||||||
|
@ -719,7 +731,6 @@ case $basic_machine in
|
||||||
i370-ibm* | ibm*)
|
i370-ibm* | ibm*)
|
||||||
basic_machine=i370-ibm
|
basic_machine=i370-ibm
|
||||||
;;
|
;;
|
||||||
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
|
|
||||||
i*86v32)
|
i*86v32)
|
||||||
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
|
||||||
os=-sysv32
|
os=-sysv32
|
||||||
|
@ -816,6 +827,10 @@ case $basic_machine in
|
||||||
ms1-*)
|
ms1-*)
|
||||||
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
|
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
|
||||||
;;
|
;;
|
||||||
|
msys)
|
||||||
|
basic_machine=i386-pc
|
||||||
|
os=-msys
|
||||||
|
;;
|
||||||
mvs)
|
mvs)
|
||||||
basic_machine=i370-ibm
|
basic_machine=i370-ibm
|
||||||
os=-mvs
|
os=-mvs
|
||||||
|
@ -1343,7 +1358,7 @@ case $os in
|
||||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||||
| -chorusos* | -chorusrdb* | -cegcc* \
|
| -chorusos* | -chorusrdb* | -cegcc* \
|
||||||
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||||
| -mingw32* | -linux-gnu* | -linux-android* \
|
| -mingw32* | -linux-gnu* | -linux-android* \
|
||||||
| -linux-newlib* | -linux-uclibc* \
|
| -linux-newlib* | -linux-uclibc* \
|
||||||
| -uxpv* | -beos* | -mpeix* | -udk* \
|
| -uxpv* | -beos* | -mpeix* | -udk* \
|
||||||
|
@ -1555,9 +1570,6 @@ case $basic_machine in
|
||||||
;;
|
;;
|
||||||
m68000-sun)
|
m68000-sun)
|
||||||
os=-sunos3
|
os=-sunos3
|
||||||
# This also exists in the configure program, but was not the
|
|
||||||
# default.
|
|
||||||
# os=-sunos4
|
|
||||||
;;
|
;;
|
||||||
m68*-cisco)
|
m68*-cisco)
|
||||||
os=-aout
|
os=-aout
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.64 for GNU Classpath 0.99.
|
# Generated by GNU Autoconf 2.64 for GNU Classpath 0.99.1-pre.
|
||||||
#
|
#
|
||||||
# Report bugs to <classpath@gnu.org>.
|
# Report bugs to <classpath@gnu.org>.
|
||||||
#
|
#
|
||||||
|
@ -559,8 +559,8 @@ MAKEFLAGS=
|
||||||
# Identity of this package.
|
# Identity of this package.
|
||||||
PACKAGE_NAME='GNU Classpath'
|
PACKAGE_NAME='GNU Classpath'
|
||||||
PACKAGE_TARNAME='classpath'
|
PACKAGE_TARNAME='classpath'
|
||||||
PACKAGE_VERSION='0.99'
|
PACKAGE_VERSION='0.99.1-pre'
|
||||||
PACKAGE_STRING='GNU Classpath 0.99'
|
PACKAGE_STRING='GNU Classpath 0.99.1-pre'
|
||||||
PACKAGE_BUGREPORT='classpath@gnu.org'
|
PACKAGE_BUGREPORT='classpath@gnu.org'
|
||||||
PACKAGE_URL='http://www.gnu.org/software/classpath/'
|
PACKAGE_URL='http://www.gnu.org/software/classpath/'
|
||||||
|
|
||||||
|
@ -669,6 +669,7 @@ GLIB_LIBS
|
||||||
GLIB_CFLAGS
|
GLIB_CFLAGS
|
||||||
MOZILLA_LIBS
|
MOZILLA_LIBS
|
||||||
MOZILLA_CFLAGS
|
MOZILLA_CFLAGS
|
||||||
|
MOC4
|
||||||
MOC
|
MOC
|
||||||
QT_LIBS
|
QT_LIBS
|
||||||
QT_CFLAGS
|
QT_CFLAGS
|
||||||
|
@ -1490,7 +1491,7 @@ if test "$ac_init_help" = "long"; then
|
||||||
# Omit some internal or obsolete options to make the list less imposing.
|
# Omit some internal or obsolete options to make the list less imposing.
|
||||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||||
cat <<_ACEOF
|
cat <<_ACEOF
|
||||||
\`configure' configures GNU Classpath 0.99 to adapt to many kinds of systems.
|
\`configure' configures GNU Classpath 0.99.1-pre to adapt to many kinds of systems.
|
||||||
|
|
||||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||||
|
|
||||||
|
@ -1565,7 +1566,7 @@ fi
|
||||||
|
|
||||||
if test -n "$ac_init_help"; then
|
if test -n "$ac_init_help"; then
|
||||||
case $ac_init_help in
|
case $ac_init_help in
|
||||||
short | recursive ) echo "Configuration of GNU Classpath 0.99:";;
|
short | recursive ) echo "Configuration of GNU Classpath 0.99.1-pre:";;
|
||||||
esac
|
esac
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
|
|
||||||
|
@ -1757,7 +1758,7 @@ fi
|
||||||
test -n "$ac_init_help" && exit $ac_status
|
test -n "$ac_init_help" && exit $ac_status
|
||||||
if $ac_init_version; then
|
if $ac_init_version; then
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
GNU Classpath configure 0.99
|
GNU Classpath configure 0.99.1-pre
|
||||||
generated by GNU Autoconf 2.64
|
generated by GNU Autoconf 2.64
|
||||||
|
|
||||||
Copyright (C) 2009 Free Software Foundation, Inc.
|
Copyright (C) 2009 Free Software Foundation, Inc.
|
||||||
|
@ -2586,7 +2587,7 @@ cat >config.log <<_ACEOF
|
||||||
This file contains any messages produced by compilers while
|
This file contains any messages produced by compilers while
|
||||||
running configure, to aid debugging if configure makes a mistake.
|
running configure, to aid debugging if configure makes a mistake.
|
||||||
|
|
||||||
It was created by GNU Classpath $as_me 0.99, which was
|
It was created by GNU Classpath $as_me 0.99.1-pre, which was
|
||||||
generated by GNU Autoconf 2.64. Invocation command line was
|
generated by GNU Autoconf 2.64. Invocation command line was
|
||||||
|
|
||||||
$ $0 $@
|
$ $0 $@
|
||||||
|
@ -3621,7 +3622,7 @@ fi
|
||||||
|
|
||||||
# Define the identity of the package.
|
# Define the identity of the package.
|
||||||
PACKAGE='classpath'
|
PACKAGE='classpath'
|
||||||
VERSION='0.99'
|
VERSION='0.99.1-pre'
|
||||||
|
|
||||||
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
@ -3880,10 +3881,10 @@ if test "${enable_Werror+set}" = set; then :
|
||||||
enableval=$enable_Werror; case "${enableval}" in
|
enableval=$enable_Werror; case "${enableval}" in
|
||||||
yes) ENABLE_WERROR=yes ;;
|
yes) ENABLE_WERROR=yes ;;
|
||||||
no) ENABLE_WERROR=no ;;
|
no) ENABLE_WERROR=no ;;
|
||||||
*) ENABLE_WERROR=default ;;
|
*) ENABLE_WERROR=no ;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
ENABLE_WERROR=default
|
ENABLE_WERROR=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
@ -11819,7 +11820,7 @@ else
|
||||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||||
lt_status=$lt_dlunknown
|
lt_status=$lt_dlunknown
|
||||||
cat > conftest.$ac_ext <<_LT_EOF
|
cat > conftest.$ac_ext <<_LT_EOF
|
||||||
#line 11822 "configure"
|
#line 11823 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#if HAVE_DLFCN_H
|
#if HAVE_DLFCN_H
|
||||||
|
@ -11925,7 +11926,7 @@ else
|
||||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||||
lt_status=$lt_dlunknown
|
lt_status=$lt_dlunknown
|
||||||
cat > conftest.$ac_ext <<_LT_EOF
|
cat > conftest.$ac_ext <<_LT_EOF
|
||||||
#line 11928 "configure"
|
#line 11929 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#if HAVE_DLFCN_H
|
#if HAVE_DLFCN_H
|
||||||
|
@ -17957,7 +17958,7 @@ $as_echo_n "checking for ld used by GCC... " >&6; }
|
||||||
# Canonicalize the path of ld
|
# Canonicalize the path of ld
|
||||||
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
|
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
|
||||||
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
|
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
|
||||||
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
|
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
|
||||||
done
|
done
|
||||||
test -z "$LD" && LD="$ac_prog"
|
test -z "$LD" && LD="$ac_prog"
|
||||||
;;
|
;;
|
||||||
|
@ -17989,11 +17990,12 @@ else
|
||||||
# Check to see if the program is GNU ld. I'd rather use --version,
|
# Check to see if the program is GNU ld. I'd rather use --version,
|
||||||
# but apparently some GNU ld's only accept -v.
|
# but apparently some GNU ld's only accept -v.
|
||||||
# Break only if it was the GNU/non-GNU ld that we prefer.
|
# Break only if it was the GNU/non-GNU ld that we prefer.
|
||||||
if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
|
case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
|
||||||
test "$with_gnu_ld" != no && break
|
*GNU* | *'with BFD'*)
|
||||||
else
|
test "$with_gnu_ld" != no && break ;;
|
||||||
test "$with_gnu_ld" != yes && break
|
*)
|
||||||
fi
|
test "$with_gnu_ld" != yes && break ;;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
IFS="$ac_save_ifs"
|
IFS="$ac_save_ifs"
|
||||||
|
@ -18017,11 +18019,12 @@ if test "${acl_cv_prog_gnu_ld+set}" = set; then :
|
||||||
$as_echo_n "(cached) " >&6
|
$as_echo_n "(cached) " >&6
|
||||||
else
|
else
|
||||||
# I'd rather use --version here, but apparently some GNU ld's only accept -v.
|
# I'd rather use --version here, but apparently some GNU ld's only accept -v.
|
||||||
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
|
case `$LD -v 2>&1 </dev/null` in
|
||||||
acl_cv_prog_gnu_ld=yes
|
*GNU* | *'with BFD'*)
|
||||||
else
|
acl_cv_prog_gnu_ld=yes ;;
|
||||||
acl_cv_prog_gnu_ld=no
|
*)
|
||||||
fi
|
acl_cv_prog_gnu_ld=no ;;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
|
||||||
$as_echo "$acl_cv_prog_gnu_ld" >&6; }
|
$as_echo "$acl_cv_prog_gnu_ld" >&6; }
|
||||||
|
@ -18029,6 +18032,7 @@ with_gnu_ld=$acl_cv_prog_gnu_ld
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
|
||||||
$as_echo_n "checking for shared library run path origin... " >&6; }
|
$as_echo_n "checking for shared library run path origin... " >&6; }
|
||||||
if test "${acl_cv_rpath+set}" = set; then :
|
if test "${acl_cv_rpath+set}" = set; then :
|
||||||
|
@ -18045,12 +18049,14 @@ fi
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
|
||||||
$as_echo "$acl_cv_rpath" >&6; }
|
$as_echo "$acl_cv_rpath" >&6; }
|
||||||
wl="$acl_cv_wl"
|
wl="$acl_cv_wl"
|
||||||
libext="$acl_cv_libext"
|
acl_libext="$acl_cv_libext"
|
||||||
shlibext="$acl_cv_shlibext"
|
acl_shlibext="$acl_cv_shlibext"
|
||||||
hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
|
acl_libname_spec="$acl_cv_libname_spec"
|
||||||
hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
|
acl_library_names_spec="$acl_cv_library_names_spec"
|
||||||
hardcode_direct="$acl_cv_hardcode_direct"
|
acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
|
||||||
hardcode_minus_L="$acl_cv_hardcode_minus_L"
|
acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
|
||||||
|
acl_hardcode_direct="$acl_cv_hardcode_direct"
|
||||||
|
acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
|
||||||
# Check whether --enable-rpath was given.
|
# Check whether --enable-rpath was given.
|
||||||
if test "${enable_rpath+set}" = set; then :
|
if test "${enable_rpath+set}" = set; then :
|
||||||
enableval=$enable_rpath; :
|
enableval=$enable_rpath; :
|
||||||
|
@ -18061,6 +18067,74 @@ fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
acl_libdirstem=lib
|
||||||
|
acl_libdirstem2=
|
||||||
|
case "$host_os" in
|
||||||
|
solaris*)
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
|
||||||
|
$as_echo_n "checking for 64-bit host... " >&6; }
|
||||||
|
if test "${gl_cv_solaris_64bit+set}" = set; then :
|
||||||
|
$as_echo_n "(cached) " >&6
|
||||||
|
else
|
||||||
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
|
/* end confdefs.h. */
|
||||||
|
|
||||||
|
#ifdef _LP64
|
||||||
|
sixtyfour bits
|
||||||
|
#endif
|
||||||
|
|
||||||
|
_ACEOF
|
||||||
|
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
|
||||||
|
$EGREP "sixtyfour bits" >/dev/null 2>&1; then :
|
||||||
|
gl_cv_solaris_64bit=yes
|
||||||
|
else
|
||||||
|
gl_cv_solaris_64bit=no
|
||||||
|
fi
|
||||||
|
rm -f conftest*
|
||||||
|
|
||||||
|
|
||||||
|
fi
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
|
||||||
|
$as_echo "$gl_cv_solaris_64bit" >&6; }
|
||||||
|
if test $gl_cv_solaris_64bit = yes; then
|
||||||
|
acl_libdirstem=lib/64
|
||||||
|
case "$host_cpu" in
|
||||||
|
sparc*) acl_libdirstem2=lib/sparcv9 ;;
|
||||||
|
i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
|
||||||
|
if test -n "$searchpath"; then
|
||||||
|
acl_save_IFS="${IFS= }"; IFS=":"
|
||||||
|
for searchdir in $searchpath; do
|
||||||
|
if test -d "$searchdir"; then
|
||||||
|
case "$searchdir" in
|
||||||
|
*/lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
|
||||||
|
*/../ | */.. )
|
||||||
|
# Better ignore directories of this form. They are misleading.
|
||||||
|
;;
|
||||||
|
*) searchdir=`cd "$searchdir" && pwd`
|
||||||
|
case "$searchdir" in
|
||||||
|
*/lib64 ) acl_libdirstem=lib64 ;;
|
||||||
|
esac ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
IFS="$acl_save_IFS"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -18100,7 +18174,11 @@ if test "${with_libiconv_prefix+set}" = set; then :
|
||||||
|
|
||||||
else
|
else
|
||||||
additional_includedir="$withval/include"
|
additional_includedir="$withval/include"
|
||||||
additional_libdir="$withval/lib"
|
additional_libdir="$withval/$acl_libdirstem"
|
||||||
|
if test "$acl_libdirstem2" != "$acl_libdirstem" \
|
||||||
|
&& ! test -d "$withval/$acl_libdirstem"; then
|
||||||
|
additional_libdir="$withval/$acl_libdirstem2"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -18109,6 +18187,8 @@ fi
|
||||||
LIBICONV=
|
LIBICONV=
|
||||||
LTLIBICONV=
|
LTLIBICONV=
|
||||||
INCICONV=
|
INCICONV=
|
||||||
|
LIBICONV_PREFIX=
|
||||||
|
HAVE_LIBICONV=
|
||||||
rpathdirs=
|
rpathdirs=
|
||||||
ltrpathdirs=
|
ltrpathdirs=
|
||||||
names_already_handled=
|
names_already_handled=
|
||||||
|
@ -18142,21 +18222,51 @@ fi
|
||||||
found_la=
|
found_la=
|
||||||
found_so=
|
found_so=
|
||||||
found_a=
|
found_a=
|
||||||
|
eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
|
||||||
|
if test -n "$acl_shlibext"; then
|
||||||
|
shrext=".$acl_shlibext" # typically: shrext=.so
|
||||||
|
else
|
||||||
|
shrext=
|
||||||
|
fi
|
||||||
if test $use_additional = yes; then
|
if test $use_additional = yes; then
|
||||||
if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
|
dir="$additional_libdir"
|
||||||
found_dir="$additional_libdir"
|
if test -n "$acl_shlibext"; then
|
||||||
found_so="$additional_libdir/lib$name.$shlibext"
|
if test -f "$dir/$libname$shrext"; then
|
||||||
if test -f "$additional_libdir/lib$name.la"; then
|
found_dir="$dir"
|
||||||
found_la="$additional_libdir/lib$name.la"
|
found_so="$dir/$libname$shrext"
|
||||||
fi
|
else
|
||||||
else
|
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
|
||||||
if test -f "$additional_libdir/lib$name.$libext"; then
|
ver=`(cd "$dir" && \
|
||||||
found_dir="$additional_libdir"
|
for f in "$libname$shrext".*; do echo "$f"; done \
|
||||||
found_a="$additional_libdir/lib$name.$libext"
|
| sed -e "s,^$libname$shrext\\\\.,," \
|
||||||
if test -f "$additional_libdir/lib$name.la"; then
|
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
|
||||||
found_la="$additional_libdir/lib$name.la"
|
| sed 1q ) 2>/dev/null`
|
||||||
|
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
|
||||||
|
found_dir="$dir"
|
||||||
|
found_so="$dir/$libname$shrext.$ver"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
eval library_names=\"$acl_library_names_spec\"
|
||||||
|
for f in $library_names; do
|
||||||
|
if test -f "$dir/$f"; then
|
||||||
|
found_dir="$dir"
|
||||||
|
found_so="$dir/$f"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
if test "X$found_dir" = "X"; then
|
||||||
|
if test -f "$dir/$libname.$acl_libext"; then
|
||||||
|
found_dir="$dir"
|
||||||
|
found_a="$dir/$libname.$acl_libext"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test "X$found_dir" != "X"; then
|
||||||
|
if test -f "$dir/$libname.la"; then
|
||||||
|
found_la="$dir/$libname.la"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if test "X$found_dir" = "X"; then
|
if test "X$found_dir" = "X"; then
|
||||||
|
@ -18173,20 +18283,43 @@ fi
|
||||||
case "$x" in
|
case "$x" in
|
||||||
-L*)
|
-L*)
|
||||||
dir=`echo "X$x" | sed -e 's/^X-L//'`
|
dir=`echo "X$x" | sed -e 's/^X-L//'`
|
||||||
if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
|
if test -n "$acl_shlibext"; then
|
||||||
found_dir="$dir"
|
if test -f "$dir/$libname$shrext"; then
|
||||||
found_so="$dir/lib$name.$shlibext"
|
|
||||||
if test -f "$dir/lib$name.la"; then
|
|
||||||
found_la="$dir/lib$name.la"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
if test -f "$dir/lib$name.$libext"; then
|
|
||||||
found_dir="$dir"
|
found_dir="$dir"
|
||||||
found_a="$dir/lib$name.$libext"
|
found_so="$dir/$libname$shrext"
|
||||||
if test -f "$dir/lib$name.la"; then
|
else
|
||||||
found_la="$dir/lib$name.la"
|
if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
|
||||||
|
ver=`(cd "$dir" && \
|
||||||
|
for f in "$libname$shrext".*; do echo "$f"; done \
|
||||||
|
| sed -e "s,^$libname$shrext\\\\.,," \
|
||||||
|
| sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
|
||||||
|
| sed 1q ) 2>/dev/null`
|
||||||
|
if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
|
||||||
|
found_dir="$dir"
|
||||||
|
found_so="$dir/$libname$shrext.$ver"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
eval library_names=\"$acl_library_names_spec\"
|
||||||
|
for f in $library_names; do
|
||||||
|
if test -f "$dir/$f"; then
|
||||||
|
found_dir="$dir"
|
||||||
|
found_so="$dir/$f"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
if test "X$found_dir" = "X"; then
|
||||||
|
if test -f "$dir/$libname.$acl_libext"; then
|
||||||
|
found_dir="$dir"
|
||||||
|
found_a="$dir/$libname.$acl_libext"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if test "X$found_dir" != "X"; then
|
||||||
|
if test -f "$dir/$libname.la"; then
|
||||||
|
found_la="$dir/$libname.la"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -18198,7 +18331,9 @@ fi
|
||||||
if test "X$found_dir" != "X"; then
|
if test "X$found_dir" != "X"; then
|
||||||
LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
|
LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
|
||||||
if test "X$found_so" != "X"; then
|
if test "X$found_so" != "X"; then
|
||||||
if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
|
if test "$enable_rpath" = no \
|
||||||
|
|| test "X$found_dir" = "X/usr/$acl_libdirstem" \
|
||||||
|
|| test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
|
||||||
LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
|
LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
|
||||||
else
|
else
|
||||||
haveit=
|
haveit=
|
||||||
|
@ -18211,10 +18346,10 @@ fi
|
||||||
if test -z "$haveit"; then
|
if test -z "$haveit"; then
|
||||||
ltrpathdirs="$ltrpathdirs $found_dir"
|
ltrpathdirs="$ltrpathdirs $found_dir"
|
||||||
fi
|
fi
|
||||||
if test "$hardcode_direct" = yes; then
|
if test "$acl_hardcode_direct" = yes; then
|
||||||
LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
|
LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
|
||||||
else
|
else
|
||||||
if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
|
if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
|
||||||
LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
|
LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
|
||||||
haveit=
|
haveit=
|
||||||
for x in $rpathdirs; do
|
for x in $rpathdirs; do
|
||||||
|
@ -18246,7 +18381,7 @@ fi
|
||||||
if test -z "$haveit"; then
|
if test -z "$haveit"; then
|
||||||
LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
|
LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
|
||||||
fi
|
fi
|
||||||
if test "$hardcode_minus_L" != no; then
|
if test "$acl_hardcode_minus_L" != no; then
|
||||||
LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
|
LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
|
||||||
else
|
else
|
||||||
LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
|
LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
|
||||||
|
@ -18263,8 +18398,18 @@ fi
|
||||||
fi
|
fi
|
||||||
additional_includedir=
|
additional_includedir=
|
||||||
case "$found_dir" in
|
case "$found_dir" in
|
||||||
*/lib | */lib/)
|
*/$acl_libdirstem | */$acl_libdirstem/)
|
||||||
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
|
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
|
||||||
|
if test "$name" = 'iconv'; then
|
||||||
|
LIBICONV_PREFIX="$basedir"
|
||||||
|
fi
|
||||||
|
additional_includedir="$basedir/include"
|
||||||
|
;;
|
||||||
|
*/$acl_libdirstem2 | */$acl_libdirstem2/)
|
||||||
|
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
|
||||||
|
if test "$name" = 'iconv'; then
|
||||||
|
LIBICONV_PREFIX="$basedir"
|
||||||
|
fi
|
||||||
additional_includedir="$basedir/include"
|
additional_includedir="$basedir/include"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -18274,7 +18419,7 @@ fi
|
||||||
if test "X$additional_includedir" = "X/usr/local/include"; then
|
if test "X$additional_includedir" = "X/usr/local/include"; then
|
||||||
if test -n "$GCC"; then
|
if test -n "$GCC"; then
|
||||||
case $host_os in
|
case $host_os in
|
||||||
linux*) haveit=yes;;
|
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -18313,12 +18458,14 @@ fi
|
||||||
case "$dep" in
|
case "$dep" in
|
||||||
-L*)
|
-L*)
|
||||||
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
|
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
|
||||||
if test "X$additional_libdir" != "X/usr/lib"; then
|
if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
|
||||||
|
&& test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
|
||||||
haveit=
|
haveit=
|
||||||
if test "X$additional_libdir" = "X/usr/local/lib"; then
|
if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
|
||||||
|
|| test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
|
||||||
if test -n "$GCC"; then
|
if test -n "$GCC"; then
|
||||||
case $host_os in
|
case $host_os in
|
||||||
linux*) haveit=yes;;
|
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -18415,21 +18562,21 @@ fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
if test "X$rpathdirs" != "X"; then
|
if test "X$rpathdirs" != "X"; then
|
||||||
if test -n "$hardcode_libdir_separator"; then
|
if test -n "$acl_hardcode_libdir_separator"; then
|
||||||
alldirs=
|
alldirs=
|
||||||
for found_dir in $rpathdirs; do
|
for found_dir in $rpathdirs; do
|
||||||
alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
|
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
|
||||||
done
|
done
|
||||||
acl_save_libdir="$libdir"
|
acl_save_libdir="$libdir"
|
||||||
libdir="$alldirs"
|
libdir="$alldirs"
|
||||||
eval flag=\"$hardcode_libdir_flag_spec\"
|
eval flag=\"$acl_hardcode_libdir_flag_spec\"
|
||||||
libdir="$acl_save_libdir"
|
libdir="$acl_save_libdir"
|
||||||
LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
|
LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
|
||||||
else
|
else
|
||||||
for found_dir in $rpathdirs; do
|
for found_dir in $rpathdirs; do
|
||||||
acl_save_libdir="$libdir"
|
acl_save_libdir="$libdir"
|
||||||
libdir="$found_dir"
|
libdir="$found_dir"
|
||||||
eval flag=\"$hardcode_libdir_flag_spec\"
|
eval flag=\"$acl_hardcode_libdir_flag_spec\"
|
||||||
libdir="$acl_save_libdir"
|
libdir="$acl_save_libdir"
|
||||||
LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
|
LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
|
||||||
done
|
done
|
||||||
|
@ -18447,6 +18594,11 @@ fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
am_save_CPPFLAGS="$CPPFLAGS"
|
am_save_CPPFLAGS="$CPPFLAGS"
|
||||||
|
|
||||||
for element in $INCICONV; do
|
for element in $INCICONV; do
|
||||||
|
@ -20897,11 +21049,11 @@ fi
|
||||||
set dummy moc-qt4; ac_word=$2
|
set dummy moc-qt4; ac_word=$2
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||||
$as_echo_n "checking for $ac_word... " >&6; }
|
$as_echo_n "checking for $ac_word... " >&6; }
|
||||||
if test "${ac_cv_prog_MOC+set}" = set; then :
|
if test "${ac_cv_prog_MOC4+set}" = set; then :
|
||||||
$as_echo_n "(cached) " >&6
|
$as_echo_n "(cached) " >&6
|
||||||
else
|
else
|
||||||
if test -n "$MOC"; then
|
if test -n "$MOC4"; then
|
||||||
ac_cv_prog_MOC="$MOC" # Let the user override the test.
|
ac_cv_prog_MOC4="$MOC4" # Let the user override the test.
|
||||||
else
|
else
|
||||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||||
for as_dir in $PATH
|
for as_dir in $PATH
|
||||||
|
@ -20910,7 +21062,7 @@ do
|
||||||
test -z "$as_dir" && as_dir=.
|
test -z "$as_dir" && as_dir=.
|
||||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||||
ac_cv_prog_MOC="moc-qt4"
|
ac_cv_prog_MOC4="moc-qt4"
|
||||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||||
break 2
|
break 2
|
||||||
fi
|
fi
|
||||||
|
@ -20920,16 +21072,21 @@ IFS=$as_save_IFS
|
||||||
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
MOC=$ac_cv_prog_MOC
|
MOC4=$ac_cv_prog_MOC4
|
||||||
if test -n "$MOC"; then
|
if test -n "$MOC4"; then
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOC" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOC4" >&5
|
||||||
$as_echo "$MOC" >&6; }
|
$as_echo "$MOC4" >&6; }
|
||||||
else
|
else
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
$as_echo "no" >&6; }
|
$as_echo "no" >&6; }
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if test x"$MOC4" != x ; then
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: Using $MOC4 as moc" >&5
|
||||||
|
$as_echo "$as_me: Using $MOC4 as moc" >&6;}
|
||||||
|
MOC=$MOC4;
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if test "x$HAVE_QT4" = "xno"; then
|
if test "x$HAVE_QT4" = "xno"; then
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: Looking for QT_CFLAGS and QT_LIBS without pkg-config" >&5
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: Looking for QT_CFLAGS and QT_LIBS without pkg-config" >&5
|
||||||
|
@ -23038,6 +23195,8 @@ $as_echo "${gjdoc_version}" >&6; }
|
||||||
case ${gjdoc_version} in
|
case ${gjdoc_version} in
|
||||||
0.7.9) ;;
|
0.7.9) ;;
|
||||||
0.8*) ;;
|
0.8*) ;;
|
||||||
|
0.9*) ;;
|
||||||
|
1*) ;;
|
||||||
*) as_fn_error "Building documentation requires GJDoc >= 0.7.9, ${gjdoc_version} found." "$LINENO" 5 ;;
|
*) as_fn_error "Building documentation requires GJDoc >= 0.7.9, ${gjdoc_version} found." "$LINENO" 5 ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
@ -23757,7 +23916,7 @@ fi
|
||||||
test "x$JAVA" = x && as_fn_error "no acceptable Java virtual machine found in \$PATH" "$LINENO" 5
|
test "x$JAVA" = x && as_fn_error "no acceptable Java virtual machine found in \$PATH" "$LINENO" 5
|
||||||
|
|
||||||
|
|
||||||
ECJ_OPTS="-warn:-deprecation,serial,unusedImport"
|
ECJ_OPTS="-warn:-deprecation,serial,unusedImport,unusedPrivate,resource"
|
||||||
JAVAC_OPTS="-Xlint:unchecked,cast,divzero,empty,finally,overrides"
|
JAVAC_OPTS="-Xlint:unchecked,cast,divzero,empty,finally,overrides"
|
||||||
GCJ_OPTS="-g"
|
GCJ_OPTS="-g"
|
||||||
if test "x$JAVAPREFIX" = x; then
|
if test "x$JAVAPREFIX" = x; then
|
||||||
|
@ -23887,7 +24046,7 @@ else
|
||||||
JAVA_TEST=Object.java
|
JAVA_TEST=Object.java
|
||||||
CLASS_TEST=Object.class
|
CLASS_TEST=Object.class
|
||||||
cat << \EOF > $JAVA_TEST
|
cat << \EOF > $JAVA_TEST
|
||||||
/* #line 23890 "configure" */
|
/* #line 24049 "configure" */
|
||||||
package java.lang;
|
package java.lang;
|
||||||
|
|
||||||
public class Object
|
public class Object
|
||||||
|
@ -23980,7 +24139,7 @@ EOF
|
||||||
if uudecode$EXEEXT Test.uue; then
|
if uudecode$EXEEXT Test.uue; then
|
||||||
ac_cv_prog_uudecode_base64=yes
|
ac_cv_prog_uudecode_base64=yes
|
||||||
else
|
else
|
||||||
echo "configure: 23983: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
|
echo "configure: 24142: uudecode had trouble decoding base 64 file 'Test.uue'" >&5
|
||||||
echo "configure: failed file was:" >&5
|
echo "configure: failed file was:" >&5
|
||||||
cat Test.uue >&5
|
cat Test.uue >&5
|
||||||
ac_cv_prog_uudecode_base64=no
|
ac_cv_prog_uudecode_base64=no
|
||||||
|
@ -24008,7 +24167,7 @@ JAVA_TEST=Test.java
|
||||||
CLASS_TEST=Test.class
|
CLASS_TEST=Test.class
|
||||||
TEST=Test
|
TEST=Test
|
||||||
cat << \EOF > $JAVA_TEST
|
cat << \EOF > $JAVA_TEST
|
||||||
/* [#]line 24011 "configure" */
|
/* [#]line 24170 "configure" */
|
||||||
public class Test {
|
public class Test {
|
||||||
public static void main (String args[]) {
|
public static void main (String args[]) {
|
||||||
System.exit (0);
|
System.exit (0);
|
||||||
|
@ -24216,7 +24375,7 @@ if test "x${use_glibj_zip}" = xfalse || \
|
||||||
JAVA_TEST=Test.java
|
JAVA_TEST=Test.java
|
||||||
CLASS_TEST=Test.class
|
CLASS_TEST=Test.class
|
||||||
cat << \EOF > $JAVA_TEST
|
cat << \EOF > $JAVA_TEST
|
||||||
/* #line 24219 "configure" */
|
/* #line 24378 "configure" */
|
||||||
public class Test
|
public class Test
|
||||||
{
|
{
|
||||||
public static void main(String args)
|
public static void main(String args)
|
||||||
|
@ -25061,7 +25220,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||||
# report actual input values of CONFIG_FILES etc. instead of their
|
# report actual input values of CONFIG_FILES etc. instead of their
|
||||||
# values after options handling.
|
# values after options handling.
|
||||||
ac_log="
|
ac_log="
|
||||||
This file was extended by GNU Classpath $as_me 0.99, which was
|
This file was extended by GNU Classpath $as_me 0.99.1-pre, which was
|
||||||
generated by GNU Autoconf 2.64. Invocation command line was
|
generated by GNU Autoconf 2.64. Invocation command line was
|
||||||
|
|
||||||
CONFIG_FILES = $CONFIG_FILES
|
CONFIG_FILES = $CONFIG_FILES
|
||||||
|
@ -25131,7 +25290,7 @@ General help using GNU software: <http://www.gnu.org/gethelp/>."
|
||||||
_ACEOF
|
_ACEOF
|
||||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||||
ac_cs_version="\\
|
ac_cs_version="\\
|
||||||
GNU Classpath config.status 0.99
|
GNU Classpath config.status 0.99.1-pre
|
||||||
configured by $0, generated by GNU Autoconf 2.64,
|
configured by $0, generated by GNU Autoconf 2.64,
|
||||||
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
|
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ dnl -----------------------------------------------------------
|
||||||
dnl define([AC_CACHE_LOAD], )dnl
|
dnl define([AC_CACHE_LOAD], )dnl
|
||||||
dnl define([AC_CACHE_SAVE], )dnl
|
dnl define([AC_CACHE_SAVE], )dnl
|
||||||
|
|
||||||
AC_INIT([GNU Classpath],[0.99],[classpath@gnu.org],[classpath])
|
AC_INIT([GNU Classpath],[0.99.1-pre],[classpath@gnu.org],[classpath])
|
||||||
AC_CONFIG_SRCDIR(java/lang/System.java)
|
AC_CONFIG_SRCDIR(java/lang/System.java)
|
||||||
AC_CONFIG_MACRO_DIR([m4])
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ CLASSPATH_CONVENIENCE="-no-undefined"
|
||||||
AC_SUBST(CLASSPATH_CONVENIENCE)
|
AC_SUBST(CLASSPATH_CONVENIENCE)
|
||||||
|
|
||||||
AC_PREREQ(2.64)
|
AC_PREREQ(2.64)
|
||||||
AM_INIT_AUTOMAKE([1.9.0 gnu std-options tar-ustar -Wno-portability])
|
AM_INIT_AUTOMAKE([1.9.0 no-dist gnu std-options tar-ustar -Wno-portability])
|
||||||
AC_CONFIG_HEADERS([include/config.h])
|
AC_CONFIG_HEADERS([include/config.h])
|
||||||
AC_PREFIX_DEFAULT(/usr/local/classpath)
|
AC_PREFIX_DEFAULT(/usr/local/classpath)
|
||||||
|
|
||||||
|
@ -183,9 +183,9 @@ AC_ARG_ENABLE([Werror],
|
||||||
[case "${enableval}" in
|
[case "${enableval}" in
|
||||||
yes) ENABLE_WERROR=yes ;;
|
yes) ENABLE_WERROR=yes ;;
|
||||||
no) ENABLE_WERROR=no ;;
|
no) ENABLE_WERROR=no ;;
|
||||||
*) ENABLE_WERROR=default ;;
|
*) ENABLE_WERROR=no ;;
|
||||||
esac],
|
esac],
|
||||||
[ENABLE_WERROR=default])
|
[ENABLE_WERROR=no])
|
||||||
|
|
||||||
dnl -----------------------------------------------------------
|
dnl -----------------------------------------------------------
|
||||||
dnl Default AWT toolkit
|
dnl Default AWT toolkit
|
||||||
|
@ -703,7 +703,11 @@ if test "x${COMPILE_JNI}" = xyes; then
|
||||||
QT_CFLAGS="$QT_CFLAGS -I$EXTRA_QT_INCLUDE_DIR",
|
QT_CFLAGS="$QT_CFLAGS -I$EXTRA_QT_INCLUDE_DIR",
|
||||||
AC_MSG_WARN([QWidget not found])))
|
AC_MSG_WARN([QWidget not found])))
|
||||||
AC_CHECK_PROG(MOC, [moc], [moc])
|
AC_CHECK_PROG(MOC, [moc], [moc])
|
||||||
AC_CHECK_PROG(MOC, [moc-qt4], [moc-qt4])
|
AC_CHECK_PROG(MOC4, [moc-qt4], [moc-qt4])
|
||||||
|
if test x"$MOC4" != x ; then
|
||||||
|
AC_MSG_NOTICE([Using $MOC4 as moc])
|
||||||
|
MOC=$MOC4;
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
if test "x$HAVE_QT4" = "xno"; then
|
if test "x$HAVE_QT4" = "xno"; then
|
||||||
AC_MSG_NOTICE([Looking for QT_CFLAGS and QT_LIBS without pkg-config])
|
AC_MSG_NOTICE([Looking for QT_CFLAGS and QT_LIBS without pkg-config])
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# depcomp - compile a program generating dependencies as side-effects
|
# depcomp - compile a program generating dependencies as side-effects
|
||||||
|
|
||||||
scriptversion=2011-12-04.11; # UTC
|
scriptversion=2009-04-28.21; # UTC
|
||||||
|
|
||||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
|
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
|
||||||
# 2011 Free Software Foundation, Inc.
|
# Software Foundation, Inc.
|
||||||
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
@ -44,7 +44,7 @@ Environment variables:
|
||||||
object Object file output by `PROGRAMS ARGS'.
|
object Object file output by `PROGRAMS ARGS'.
|
||||||
DEPDIR directory where to store dependencies.
|
DEPDIR directory where to store dependencies.
|
||||||
depfile Dependency file to output.
|
depfile Dependency file to output.
|
||||||
tmpdepfile Temporary file to use when outputting dependencies.
|
tmpdepfile Temporary file to use when outputing dependencies.
|
||||||
libtool Whether libtool is used (yes/no).
|
libtool Whether libtool is used (yes/no).
|
||||||
|
|
||||||
Report bugs to <bug-automake@gnu.org>.
|
Report bugs to <bug-automake@gnu.org>.
|
||||||
|
@ -90,18 +90,10 @@ if test "$depmode" = msvcmsys; then
|
||||||
# This is just like msvisualcpp but w/o cygpath translation.
|
# This is just like msvisualcpp but w/o cygpath translation.
|
||||||
# Just convert the backslash-escaped backslashes to single forward
|
# Just convert the backslash-escaped backslashes to single forward
|
||||||
# slashes to satisfy depend.m4
|
# slashes to satisfy depend.m4
|
||||||
cygpath_u='sed s,\\\\,/,g'
|
cygpath_u="sed s,\\\\\\\\,/,g"
|
||||||
depmode=msvisualcpp
|
depmode=msvisualcpp
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$depmode" = msvc7msys; then
|
|
||||||
# This is just like msvc7 but w/o cygpath translation.
|
|
||||||
# Just convert the backslash-escaped backslashes to single forward
|
|
||||||
# slashes to satisfy depend.m4
|
|
||||||
cygpath_u='sed s,\\\\,/,g'
|
|
||||||
depmode=msvc7
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$depmode" in
|
case "$depmode" in
|
||||||
gcc3)
|
gcc3)
|
||||||
## gcc 3 implements dependency tracking that does exactly what
|
## gcc 3 implements dependency tracking that does exactly what
|
||||||
|
@ -166,12 +158,10 @@ gcc)
|
||||||
' < "$tmpdepfile" |
|
' < "$tmpdepfile" |
|
||||||
## Some versions of gcc put a space before the `:'. On the theory
|
## Some versions of gcc put a space before the `:'. On the theory
|
||||||
## that the space means something, we add a space to the output as
|
## that the space means something, we add a space to the output as
|
||||||
## well. hp depmode also adds that space, but also prefixes the VPATH
|
## well.
|
||||||
## to the object. Take care to not repeat it in the output.
|
|
||||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
## correctly. Breaking it into two sed invocations is a workaround.
|
## correctly. Breaking it into two sed invocations is a workaround.
|
||||||
sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
|
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||||
| sed -e 's/$/ :/' >> "$depfile"
|
|
||||||
rm -f "$tmpdepfile"
|
rm -f "$tmpdepfile"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
@ -415,52 +405,6 @@ tru64)
|
||||||
rm -f "$tmpdepfile"
|
rm -f "$tmpdepfile"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
msvc7)
|
|
||||||
if test "$libtool" = yes; then
|
|
||||||
showIncludes=-Wc,-showIncludes
|
|
||||||
else
|
|
||||||
showIncludes=-showIncludes
|
|
||||||
fi
|
|
||||||
"$@" $showIncludes > "$tmpdepfile"
|
|
||||||
stat=$?
|
|
||||||
grep -v '^Note: including file: ' "$tmpdepfile"
|
|
||||||
if test "$stat" = 0; then :
|
|
||||||
else
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
exit $stat
|
|
||||||
fi
|
|
||||||
rm -f "$depfile"
|
|
||||||
echo "$object : \\" > "$depfile"
|
|
||||||
# The first sed program below extracts the file names and escapes
|
|
||||||
# backslashes for cygpath. The second sed program outputs the file
|
|
||||||
# name when reading, but also accumulates all include files in the
|
|
||||||
# hold buffer in order to output them again at the end. This only
|
|
||||||
# works with sed implementations that can handle large buffers.
|
|
||||||
sed < "$tmpdepfile" -n '
|
|
||||||
/^Note: including file: *\(.*\)/ {
|
|
||||||
s//\1/
|
|
||||||
s/\\/\\\\/g
|
|
||||||
p
|
|
||||||
}' | $cygpath_u | sort -u | sed -n '
|
|
||||||
s/ /\\ /g
|
|
||||||
s/\(.*\)/ \1 \\/p
|
|
||||||
s/.\(.*\) \\/\1:/
|
|
||||||
H
|
|
||||||
$ {
|
|
||||||
s/.*/ /
|
|
||||||
G
|
|
||||||
p
|
|
||||||
}' >> "$depfile"
|
|
||||||
rm -f "$tmpdepfile"
|
|
||||||
;;
|
|
||||||
|
|
||||||
msvc7msys)
|
|
||||||
# This case exists only to let depend.m4 do its work. It works by
|
|
||||||
# looking at the text of this script. This case will never be run,
|
|
||||||
# since it is checked for above.
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
|
|
||||||
#nosideeffect)
|
#nosideeffect)
|
||||||
# This comment above is used by automake to tell side-effect
|
# This comment above is used by automake to tell side-effect
|
||||||
# dependency tracking mechanisms from slower ones.
|
# dependency tracking mechanisms from slower ones.
|
||||||
|
@ -559,9 +503,7 @@ makedepend)
|
||||||
touch "$tmpdepfile"
|
touch "$tmpdepfile"
|
||||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||||
rm -f "$depfile"
|
rm -f "$depfile"
|
||||||
# makedepend may prepend the VPATH from the source file name to the object.
|
cat < "$tmpdepfile" > "$depfile"
|
||||||
# No need to regex-escape $object, excess matching of '.' is harmless.
|
|
||||||
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
|
|
||||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||||
' | \
|
' | \
|
||||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||||
|
|
|
@ -7,8 +7,9 @@ EXTRA_DIST = README.jaxp texi2pod.pl $(man_MANS)
|
||||||
TEXINFO_TEX = ../../gcc/doc/include/texinfo.tex
|
TEXINFO_TEX = ../../gcc/doc/include/texinfo.tex
|
||||||
info_TEXINFOS = cp-tools.texinfo
|
info_TEXINFOS = cp-tools.texinfo
|
||||||
|
|
||||||
|
# POSIX locale necessary to make grep work; see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=586134
|
||||||
.texinfo.dvi:
|
.texinfo.dvi:
|
||||||
texi2dvi $<
|
LC_ALL=POSIX texi2dvi --build-dir=$(builddir) -o $@ $<
|
||||||
|
|
||||||
.dvi.ps:
|
.dvi.ps:
|
||||||
dvips -o $@ $<
|
dvips -o $@ $<
|
||||||
|
@ -135,3 +136,6 @@ MAINTAINERCLEANFILES = \
|
||||||
$(srcdir)/gserialver.1 \
|
$(srcdir)/gserialver.1 \
|
||||||
$(srcdir)/gtnameserv.1 \
|
$(srcdir)/gtnameserv.1 \
|
||||||
$(srcdir)/cp-tools.info
|
$(srcdir)/cp-tools.info
|
||||||
|
|
||||||
|
clean-local:
|
||||||
|
-rm -rf *.t2d
|
||||||
|
|
|
@ -39,9 +39,6 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in texinfo.tex
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
|
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
|
||||||
$(top_srcdir)/../../config/lead-dot.m4 \
|
$(top_srcdir)/../../config/lead-dot.m4 \
|
||||||
$(top_srcdir)/../../config/lib-ld.m4 \
|
|
||||||
$(top_srcdir)/../../config/lib-link.m4 \
|
|
||||||
$(top_srcdir)/../../config/lib-prefix.m4 \
|
|
||||||
$(top_srcdir)/../../config/multi.m4 \
|
$(top_srcdir)/../../config/multi.m4 \
|
||||||
$(top_srcdir)/../../config/no-executables.m4 \
|
$(top_srcdir)/../../config/no-executables.m4 \
|
||||||
$(top_srcdir)/../../config/override.m4 \
|
$(top_srcdir)/../../config/override.m4 \
|
||||||
|
@ -60,7 +57,9 @@ am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
|
||||||
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
||||||
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
|
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
|
||||||
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
|
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
|
||||||
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
|
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
|
||||||
|
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
|
||||||
|
$(top_srcdir)/configure.ac
|
||||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
$(ACLOCAL_M4)
|
$(ACLOCAL_M4)
|
||||||
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
|
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
|
||||||
|
@ -245,6 +244,7 @@ MAKEINFO = @MAKEINFO@
|
||||||
MKDIR = @MKDIR@
|
MKDIR = @MKDIR@
|
||||||
MKDIR_P = @MKDIR_P@
|
MKDIR_P = @MKDIR_P@
|
||||||
MOC = @MOC@
|
MOC = @MOC@
|
||||||
|
MOC4 = @MOC4@
|
||||||
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
|
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
|
||||||
MOZILLA_LIBS = @MOZILLA_LIBS@
|
MOZILLA_LIBS = @MOZILLA_LIBS@
|
||||||
NM = @NM@
|
NM = @NM@
|
||||||
|
@ -868,7 +868,8 @@ maintainer-clean-generic:
|
||||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||||
clean: clean-recursive
|
clean: clean-recursive
|
||||||
|
|
||||||
clean-am: clean-aminfo clean-generic clean-libtool mostlyclean-am
|
clean-am: clean-aminfo clean-generic clean-libtool clean-local \
|
||||||
|
mostlyclean-am
|
||||||
|
|
||||||
distclean: distclean-recursive
|
distclean: distclean-recursive
|
||||||
-rm -f Makefile
|
-rm -f Makefile
|
||||||
|
@ -1018,10 +1019,10 @@ uninstall-man: uninstall-man1
|
||||||
|
|
||||||
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
|
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
|
||||||
all all-am all-local check check-am clean clean-aminfo \
|
all all-am all-local check check-am clean clean-aminfo \
|
||||||
clean-generic clean-libtool ctags ctags-recursive dist-info \
|
clean-generic clean-libtool clean-local ctags ctags-recursive \
|
||||||
distclean distclean-generic distclean-libtool distclean-tags \
|
dist-info distclean distclean-generic distclean-libtool \
|
||||||
distdir dvi dvi-am html html-am info info-am install \
|
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||||
install-am install-data install-data-am install-dvi \
|
install install-am install-data install-data-am install-dvi \
|
||||||
install-dvi-am install-exec install-exec-am install-html \
|
install-dvi-am install-exec install-exec-am install-html \
|
||||||
install-html-am install-info install-info-am install-man \
|
install-html-am install-info install-info-am install-man \
|
||||||
install-man1 install-pdf install-pdf-am install-ps \
|
install-man1 install-pdf install-pdf-am install-ps \
|
||||||
|
@ -1034,8 +1035,9 @@ uninstall-man: uninstall-man1
|
||||||
uninstall-man uninstall-man1 uninstall-pdf-am uninstall-ps-am
|
uninstall-man uninstall-man1 uninstall-pdf-am uninstall-ps-am
|
||||||
|
|
||||||
|
|
||||||
|
# POSIX locale necessary to make grep work; see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=586134
|
||||||
.texinfo.dvi:
|
.texinfo.dvi:
|
||||||
texi2dvi $<
|
LC_ALL=POSIX texi2dvi --build-dir=$(builddir) -o $@ $<
|
||||||
|
|
||||||
.dvi.ps:
|
.dvi.ps:
|
||||||
dvips -o $@ $<
|
dvips -o $@ $<
|
||||||
|
@ -1113,6 +1115,9 @@ stamp-geninsrc: $(TOOLS_MANFILES) cp-tools.info
|
||||||
-cp -p cp-tools.info $(srcdir)/cp-tools.info
|
-cp -p cp-tools.info $(srcdir)/cp-tools.info
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
|
clean-local:
|
||||||
|
-rm -rf *.t2d
|
||||||
|
|
||||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
.NOEXPORT:
|
.NOEXPORT:
|
||||||
|
|
|
@ -40,9 +40,6 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
|
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
|
||||||
$(top_srcdir)/../../config/lead-dot.m4 \
|
$(top_srcdir)/../../config/lead-dot.m4 \
|
||||||
$(top_srcdir)/../../config/lib-ld.m4 \
|
|
||||||
$(top_srcdir)/../../config/lib-link.m4 \
|
|
||||||
$(top_srcdir)/../../config/lib-prefix.m4 \
|
|
||||||
$(top_srcdir)/../../config/multi.m4 \
|
$(top_srcdir)/../../config/multi.m4 \
|
||||||
$(top_srcdir)/../../config/no-executables.m4 \
|
$(top_srcdir)/../../config/no-executables.m4 \
|
||||||
$(top_srcdir)/../../config/override.m4 \
|
$(top_srcdir)/../../config/override.m4 \
|
||||||
|
@ -61,7 +58,9 @@ am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
|
||||||
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
||||||
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
|
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
|
||||||
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
|
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
|
||||||
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
|
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
|
||||||
|
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
|
||||||
|
$(top_srcdir)/configure.ac
|
||||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
$(ACLOCAL_M4)
|
$(ACLOCAL_M4)
|
||||||
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
|
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
|
||||||
|
@ -170,6 +169,7 @@ MAKEINFO = @MAKEINFO@
|
||||||
MKDIR = @MKDIR@
|
MKDIR = @MKDIR@
|
||||||
MKDIR_P = @MKDIR_P@
|
MKDIR_P = @MKDIR_P@
|
||||||
MOC = @MOC@
|
MOC = @MOC@
|
||||||
|
MOC4 = @MOC4@
|
||||||
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
|
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
|
||||||
MOZILLA_LIBS = @MOZILLA_LIBS@
|
MOZILLA_LIBS = @MOZILLA_LIBS@
|
||||||
NM = @NM@
|
NM = @NM@
|
||||||
|
|
|
@ -2438,14 +2438,14 @@ with the header @samp{CVS ID}, you would specify:
|
||||||
Let's say that a class javadoc comment contains
|
Let's say that a class javadoc comment contains
|
||||||
|
|
||||||
@smallexample
|
@smallexample
|
||||||
@@cvsid $Id: cp-tools.texinfo,v 1.9 2012/03/07 15:27:27 gnu_andrew Exp $
|
@@cvsid $Id: cp-tools.texinfo,v 1.9 2012-03-07 15:27:27 gnu_andrew Exp $
|
||||||
@end smallexample
|
@end smallexample
|
||||||
|
|
||||||
Then the HTML output will contain something like
|
Then the HTML output will contain something like
|
||||||
|
|
||||||
@smallexample
|
@smallexample
|
||||||
CVS ID:
|
CVS ID:
|
||||||
$Id: cp-tools.texinfo,v 1.9 2012/03/07 15:27:27 gnu_andrew Exp $
|
$Id: cp-tools.texinfo,v 1.9 2012-03-07 15:27:27 gnu_andrew Exp $
|
||||||
@end smallexample
|
@end smallexample
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -41,9 +41,6 @@ DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
|
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
|
||||||
$(top_srcdir)/../../config/lead-dot.m4 \
|
$(top_srcdir)/../../config/lead-dot.m4 \
|
||||||
$(top_srcdir)/../../config/lib-ld.m4 \
|
|
||||||
$(top_srcdir)/../../config/lib-link.m4 \
|
|
||||||
$(top_srcdir)/../../config/lib-prefix.m4 \
|
|
||||||
$(top_srcdir)/../../config/multi.m4 \
|
$(top_srcdir)/../../config/multi.m4 \
|
||||||
$(top_srcdir)/../../config/no-executables.m4 \
|
$(top_srcdir)/../../config/no-executables.m4 \
|
||||||
$(top_srcdir)/../../config/override.m4 \
|
$(top_srcdir)/../../config/override.m4 \
|
||||||
|
@ -62,7 +59,9 @@ am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
|
||||||
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
||||||
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
|
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
|
||||||
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
|
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
|
||||||
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
|
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
|
||||||
|
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
|
||||||
|
$(top_srcdir)/configure.ac
|
||||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
$(ACLOCAL_M4)
|
$(ACLOCAL_M4)
|
||||||
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
|
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
|
||||||
|
@ -193,6 +192,7 @@ MAKEINFO = @MAKEINFO@
|
||||||
MKDIR = @MKDIR@
|
MKDIR = @MKDIR@
|
||||||
MKDIR_P = @MKDIR_P@
|
MKDIR_P = @MKDIR_P@
|
||||||
MOC = @MOC@
|
MOC = @MOC@
|
||||||
|
MOC4 = @MOC4@
|
||||||
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
|
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
|
||||||
MOZILLA_LIBS = @MOZILLA_LIBS@
|
MOZILLA_LIBS = @MOZILLA_LIBS@
|
||||||
NM = @NM@
|
NM = @NM@
|
||||||
|
|
|
@ -39,9 +39,6 @@ DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
|
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
|
||||||
$(top_srcdir)/../../config/lead-dot.m4 \
|
$(top_srcdir)/../../config/lead-dot.m4 \
|
||||||
$(top_srcdir)/../../config/lib-ld.m4 \
|
|
||||||
$(top_srcdir)/../../config/lib-link.m4 \
|
|
||||||
$(top_srcdir)/../../config/lib-prefix.m4 \
|
|
||||||
$(top_srcdir)/../../config/multi.m4 \
|
$(top_srcdir)/../../config/multi.m4 \
|
||||||
$(top_srcdir)/../../config/no-executables.m4 \
|
$(top_srcdir)/../../config/no-executables.m4 \
|
||||||
$(top_srcdir)/../../config/override.m4 \
|
$(top_srcdir)/../../config/override.m4 \
|
||||||
|
@ -60,7 +57,9 @@ am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
|
||||||
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
||||||
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
|
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
|
||||||
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
|
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
|
||||||
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
|
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
|
||||||
|
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
|
||||||
|
$(top_srcdir)/configure.ac
|
||||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
$(ACLOCAL_M4)
|
$(ACLOCAL_M4)
|
||||||
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
|
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
|
||||||
|
@ -208,6 +207,7 @@ MAKEINFO = @MAKEINFO@
|
||||||
MKDIR = @MKDIR@
|
MKDIR = @MKDIR@
|
||||||
MKDIR_P = @MKDIR_P@
|
MKDIR_P = @MKDIR_P@
|
||||||
MOC = @MOC@
|
MOC = @MOC@
|
||||||
|
MOC4 = @MOC4@
|
||||||
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
|
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
|
||||||
MOZILLA_LIBS = @MOZILLA_LIBS@
|
MOZILLA_LIBS = @MOZILLA_LIBS@
|
||||||
NM = @NM@
|
NM = @NM@
|
||||||
|
|
|
@ -39,9 +39,6 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
|
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
|
||||||
$(top_srcdir)/../../config/lead-dot.m4 \
|
$(top_srcdir)/../../config/lead-dot.m4 \
|
||||||
$(top_srcdir)/../../config/lib-ld.m4 \
|
|
||||||
$(top_srcdir)/../../config/lib-link.m4 \
|
|
||||||
$(top_srcdir)/../../config/lib-prefix.m4 \
|
|
||||||
$(top_srcdir)/../../config/multi.m4 \
|
$(top_srcdir)/../../config/multi.m4 \
|
||||||
$(top_srcdir)/../../config/no-executables.m4 \
|
$(top_srcdir)/../../config/no-executables.m4 \
|
||||||
$(top_srcdir)/../../config/override.m4 \
|
$(top_srcdir)/../../config/override.m4 \
|
||||||
|
@ -60,7 +57,9 @@ am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
|
||||||
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
||||||
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
|
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
|
||||||
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
|
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
|
||||||
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
|
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
|
||||||
|
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
|
||||||
|
$(top_srcdir)/configure.ac
|
||||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
$(ACLOCAL_M4)
|
$(ACLOCAL_M4)
|
||||||
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
|
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
|
||||||
|
@ -168,6 +167,7 @@ MAKEINFO = @MAKEINFO@
|
||||||
MKDIR = @MKDIR@
|
MKDIR = @MKDIR@
|
||||||
MKDIR_P = @MKDIR_P@
|
MKDIR_P = @MKDIR_P@
|
||||||
MOC = @MOC@
|
MOC = @MOC@
|
||||||
|
MOC4 = @MOC4@
|
||||||
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
|
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
|
||||||
MOZILLA_LIBS = @MOZILLA_LIBS@
|
MOZILLA_LIBS = @MOZILLA_LIBS@
|
||||||
NM = @NM@
|
NM = @NM@
|
||||||
|
|
|
@ -39,9 +39,6 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
|
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
|
||||||
$(top_srcdir)/../../config/lead-dot.m4 \
|
$(top_srcdir)/../../config/lead-dot.m4 \
|
||||||
$(top_srcdir)/../../config/lib-ld.m4 \
|
|
||||||
$(top_srcdir)/../../config/lib-link.m4 \
|
|
||||||
$(top_srcdir)/../../config/lib-prefix.m4 \
|
|
||||||
$(top_srcdir)/../../config/multi.m4 \
|
$(top_srcdir)/../../config/multi.m4 \
|
||||||
$(top_srcdir)/../../config/no-executables.m4 \
|
$(top_srcdir)/../../config/no-executables.m4 \
|
||||||
$(top_srcdir)/../../config/override.m4 \
|
$(top_srcdir)/../../config/override.m4 \
|
||||||
|
@ -60,7 +57,9 @@ am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
|
||||||
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
||||||
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
|
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
|
||||||
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
|
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
|
||||||
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
|
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
|
||||||
|
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
|
||||||
|
$(top_srcdir)/configure.ac
|
||||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
$(ACLOCAL_M4)
|
$(ACLOCAL_M4)
|
||||||
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
|
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
|
||||||
|
@ -168,6 +167,7 @@ MAKEINFO = @MAKEINFO@
|
||||||
MKDIR = @MKDIR@
|
MKDIR = @MKDIR@
|
||||||
MKDIR_P = @MKDIR_P@
|
MKDIR_P = @MKDIR_P@
|
||||||
MOC = @MOC@
|
MOC = @MOC@
|
||||||
|
MOC4 = @MOC4@
|
||||||
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
|
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
|
||||||
MOZILLA_LIBS = @MOZILLA_LIBS@
|
MOZILLA_LIBS = @MOZILLA_LIBS@
|
||||||
NM = @NM@
|
NM = @NM@
|
||||||
|
|
|
@ -39,9 +39,6 @@ DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
|
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
|
||||||
$(top_srcdir)/../../config/lead-dot.m4 \
|
$(top_srcdir)/../../config/lead-dot.m4 \
|
||||||
$(top_srcdir)/../../config/lib-ld.m4 \
|
|
||||||
$(top_srcdir)/../../config/lib-link.m4 \
|
|
||||||
$(top_srcdir)/../../config/lib-prefix.m4 \
|
|
||||||
$(top_srcdir)/../../config/multi.m4 \
|
$(top_srcdir)/../../config/multi.m4 \
|
||||||
$(top_srcdir)/../../config/no-executables.m4 \
|
$(top_srcdir)/../../config/no-executables.m4 \
|
||||||
$(top_srcdir)/../../config/override.m4 \
|
$(top_srcdir)/../../config/override.m4 \
|
||||||
|
@ -60,7 +57,9 @@ am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
|
||||||
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
||||||
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
|
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
|
||||||
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
|
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
|
||||||
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
|
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
|
||||||
|
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
|
||||||
|
$(top_srcdir)/configure.ac
|
||||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
$(ACLOCAL_M4)
|
$(ACLOCAL_M4)
|
||||||
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
|
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
|
||||||
|
@ -168,6 +167,7 @@ MAKEINFO = @MAKEINFO@
|
||||||
MKDIR = @MKDIR@
|
MKDIR = @MKDIR@
|
||||||
MKDIR_P = @MKDIR_P@
|
MKDIR_P = @MKDIR_P@
|
||||||
MOC = @MOC@
|
MOC = @MOC@
|
||||||
|
MOC4 = @MOC4@
|
||||||
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
|
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
|
||||||
MOZILLA_LIBS = @MOZILLA_LIBS@
|
MOZILLA_LIBS = @MOZILLA_LIBS@
|
||||||
NM = @NM@
|
NM = @NM@
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// EntityResolver2.java - Extended SAX entity resolver.
|
// EntityResolver2.java - Extended SAX entity resolver.
|
||||||
// http://www.saxproject.org
|
// http://www.saxproject.org
|
||||||
// No warranty; no copyright -- use this as you will.
|
// No warranty; no copyright -- use this as you will.
|
||||||
// $Id: EntityResolver2.java,v 1.2 2006/12/10 20:25:41 gnu_andrew Exp $
|
// $Id: EntityResolver2.java,v 1.2 2006-12-10 20:25:41 gnu_andrew Exp $
|
||||||
|
|
||||||
package org.xml.sax.ext;
|
package org.xml.sax.ext;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Locator2Impl.java - extended LocatorImpl
|
// Locator2Impl.java - extended LocatorImpl
|
||||||
// http://www.saxproject.org
|
// http://www.saxproject.org
|
||||||
// Public Domain: no warranty.
|
// Public Domain: no warranty.
|
||||||
// $Id: Locator2Impl.java,v 1.2 2006/12/10 20:25:41 gnu_andrew Exp $
|
// $Id: Locator2Impl.java,v 1.2 2006-12-10 20:25:41 gnu_andrew Exp $
|
||||||
|
|
||||||
package org.xml.sax.ext;
|
package org.xml.sax.ext;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// http://www.saxproject.org
|
// http://www.saxproject.org
|
||||||
// Written by David Megginson
|
// Written by David Megginson
|
||||||
// NO WARRANTY! This class is in the public domain.
|
// NO WARRANTY! This class is in the public domain.
|
||||||
// $Id: XMLReaderAdapter.java,v 1.2 2006/12/10 20:25:41 gnu_andrew Exp $
|
// $Id: XMLReaderAdapter.java,v 1.2 2006-12-10 20:25:41 gnu_andrew Exp $
|
||||||
|
|
||||||
package org.xml.sax.helpers;
|
package org.xml.sax.helpers;
|
||||||
|
|
||||||
|
|
|
@ -39,9 +39,6 @@ DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
|
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
|
||||||
$(top_srcdir)/../../config/lead-dot.m4 \
|
$(top_srcdir)/../../config/lead-dot.m4 \
|
||||||
$(top_srcdir)/../../config/lib-ld.m4 \
|
|
||||||
$(top_srcdir)/../../config/lib-link.m4 \
|
|
||||||
$(top_srcdir)/../../config/lib-prefix.m4 \
|
|
||||||
$(top_srcdir)/../../config/multi.m4 \
|
$(top_srcdir)/../../config/multi.m4 \
|
||||||
$(top_srcdir)/../../config/no-executables.m4 \
|
$(top_srcdir)/../../config/no-executables.m4 \
|
||||||
$(top_srcdir)/../../config/override.m4 \
|
$(top_srcdir)/../../config/override.m4 \
|
||||||
|
@ -60,7 +57,9 @@ am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
|
||||||
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
||||||
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
|
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
|
||||||
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
|
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
|
||||||
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
|
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
|
||||||
|
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
|
||||||
|
$(top_srcdir)/configure.ac
|
||||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
$(ACLOCAL_M4)
|
$(ACLOCAL_M4)
|
||||||
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
|
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
|
||||||
|
@ -168,6 +167,7 @@ MAKEINFO = @MAKEINFO@
|
||||||
MKDIR = @MKDIR@
|
MKDIR = @MKDIR@
|
||||||
MKDIR_P = @MKDIR_P@
|
MKDIR_P = @MKDIR_P@
|
||||||
MOC = @MOC@
|
MOC = @MOC@
|
||||||
|
MOC4 = @MOC4@
|
||||||
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
|
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
|
||||||
MOZILLA_LIBS = @MOZILLA_LIBS@
|
MOZILLA_LIBS = @MOZILLA_LIBS@
|
||||||
NM = @NM@
|
NM = @NM@
|
||||||
|
|
|
@ -88,6 +88,11 @@ public final class FileLockImpl extends FileLock
|
||||||
return valid;
|
return valid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void close() throws Exception
|
||||||
|
{
|
||||||
|
release();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Releases the lock if it is still valid. Marks this lock as invalid.
|
* Releases the lock if it is still valid. Marks this lock as invalid.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* AttributedFormatBuffer.java -- Implements an attributed FormatBuffer.
|
/* AttributedFormatBuffer.java -- Implements an attributed FormatBuffer.
|
||||||
Copyright (C) 2004 Free Software Foundation, Inc.
|
Copyright (C) 2004, 2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
@ -41,6 +41,10 @@ import gnu.java.lang.CPStringBuilder;
|
||||||
import java.text.AttributedCharacterIterator;
|
import java.text.AttributedCharacterIterator;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import static java.text.AttributedCharacterIterator.Attribute;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is an implementation of a FormatBuffer with attributes.
|
* This class is an implementation of a FormatBuffer with attributes.
|
||||||
|
@ -53,12 +57,12 @@ import java.util.HashMap;
|
||||||
public class AttributedFormatBuffer implements FormatBuffer
|
public class AttributedFormatBuffer implements FormatBuffer
|
||||||
{
|
{
|
||||||
private final CPStringBuilder buffer;
|
private final CPStringBuilder buffer;
|
||||||
private final ArrayList ranges;
|
private final ArrayList<Integer> ranges;
|
||||||
private final ArrayList attributes;
|
private final ArrayList<Map<Attribute,Object>> attributes;
|
||||||
private int[] a_ranges;
|
private int[] aRanges;
|
||||||
private HashMap[] a_attributes;
|
private List<Map<Attribute,Object>> aAttributes;
|
||||||
private int startingRange;
|
private int startingRange;
|
||||||
AttributedCharacterIterator.Attribute defaultAttr;
|
Attribute defaultAttr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This constructor accepts a StringBuffer. If the buffer contains
|
* This constructor accepts a StringBuffer. If the buffer contains
|
||||||
|
@ -67,8 +71,8 @@ public class AttributedFormatBuffer implements FormatBuffer
|
||||||
public AttributedFormatBuffer(CPStringBuilder buffer)
|
public AttributedFormatBuffer(CPStringBuilder buffer)
|
||||||
{
|
{
|
||||||
this.buffer = new CPStringBuilder(buffer);
|
this.buffer = new CPStringBuilder(buffer);
|
||||||
this.ranges = new ArrayList();
|
this.ranges = new ArrayList<Integer>();
|
||||||
this.attributes = new ArrayList();
|
this.attributes = new ArrayList<Map<Attribute,Object>>();
|
||||||
this.defaultAttr = null;
|
this.defaultAttr = null;
|
||||||
if (buffer.length() != 0)
|
if (buffer.length() != 0)
|
||||||
{
|
{
|
||||||
|
@ -94,23 +98,23 @@ public class AttributedFormatBuffer implements FormatBuffer
|
||||||
* and attributes it adds exactly one attribute for the range of characters
|
* and attributes it adds exactly one attribute for the range of characters
|
||||||
* comprised between the last entry in 'ranges' and the specified new range.
|
* comprised between the last entry in 'ranges' and the specified new range.
|
||||||
*
|
*
|
||||||
* @param new_range A new range to insert in the list.
|
* @param newRange A new range to insert in the list.
|
||||||
* @param attr A new attribute to insert in the list.
|
* @param attr A new attribute to insert in the list.
|
||||||
*/
|
*/
|
||||||
private final void addAttribute(int new_range, AttributedCharacterIterator.Attribute attr)
|
private final void addAttribute(int newRange, Attribute attr)
|
||||||
{
|
{
|
||||||
HashMap map;
|
Map<Attribute,Object> map;
|
||||||
|
|
||||||
if (attr != null)
|
if (attr != null)
|
||||||
{
|
{
|
||||||
map = new HashMap();
|
map = new HashMap<Attribute,Object>();
|
||||||
map.put(attr, attr);
|
map.put(attr, attr);
|
||||||
attributes.add(map);
|
attributes.add(map);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
attributes.add(null);
|
attributes.add(null);
|
||||||
|
|
||||||
ranges.add(new Integer(new_range));
|
ranges.add(Integer.valueOf(newRange));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void append(String s)
|
public void append(String s)
|
||||||
|
@ -120,7 +124,7 @@ public class AttributedFormatBuffer implements FormatBuffer
|
||||||
buffer.append(s);
|
buffer.append(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void append(String s, AttributedCharacterIterator.Attribute attr)
|
public void append(String s, Attribute attr)
|
||||||
{
|
{
|
||||||
setDefaultAttribute(attr);
|
setDefaultAttribute(attr);
|
||||||
startingRange = buffer.length();
|
startingRange = buffer.length();
|
||||||
|
@ -128,7 +132,7 @@ public class AttributedFormatBuffer implements FormatBuffer
|
||||||
setDefaultAttribute(null);
|
setDefaultAttribute(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void append(String s, int[] ranges, HashMap[] attrs)
|
public void append(String s, int[] ranges, List<Map<Attribute,Object>> attrs)
|
||||||
{
|
{
|
||||||
int curPos = buffer.length();
|
int curPos = buffer.length();
|
||||||
|
|
||||||
|
@ -137,8 +141,8 @@ public class AttributedFormatBuffer implements FormatBuffer
|
||||||
{
|
{
|
||||||
for (int i = 0; i < ranges.length; i++)
|
for (int i = 0; i < ranges.length; i++)
|
||||||
{
|
{
|
||||||
this.ranges.add(new Integer(ranges[i] + curPos));
|
this.ranges.add(Integer.valueOf(ranges[i] + curPos));
|
||||||
this.attributes.add(attrs[i]);
|
this.attributes.add(attrs.get(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
startingRange = buffer.length();
|
startingRange = buffer.length();
|
||||||
|
@ -152,14 +156,14 @@ public class AttributedFormatBuffer implements FormatBuffer
|
||||||
buffer.append(c);
|
buffer.append(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void append(char c, AttributedCharacterIterator.Attribute attr)
|
public void append(char c, Attribute attr)
|
||||||
{
|
{
|
||||||
setDefaultAttribute(attr);
|
setDefaultAttribute(attr);
|
||||||
buffer.append(c);
|
buffer.append(c);
|
||||||
setDefaultAttribute(null);
|
setDefaultAttribute(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDefaultAttribute(AttributedCharacterIterator.Attribute attr)
|
public void setDefaultAttribute(Attribute attr)
|
||||||
{
|
{
|
||||||
if (attr == defaultAttr)
|
if (attr == defaultAttr)
|
||||||
return;
|
return;
|
||||||
|
@ -174,7 +178,7 @@ public class AttributedFormatBuffer implements FormatBuffer
|
||||||
startingRange = currentPos;
|
startingRange = currentPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AttributedCharacterIterator.Attribute getDefaultAttribute()
|
public Attribute getDefaultAttribute()
|
||||||
{
|
{
|
||||||
return defaultAttr;
|
return defaultAttr;
|
||||||
}
|
}
|
||||||
|
@ -209,12 +213,11 @@ public class AttributedFormatBuffer implements FormatBuffer
|
||||||
|
|
||||||
addAttribute(buffer.length(), defaultAttr);
|
addAttribute(buffer.length(), defaultAttr);
|
||||||
|
|
||||||
a_ranges = new int[ranges.size()];
|
aRanges = new int[ranges.size()];
|
||||||
for (int i = 0; i < a_ranges.length; i++)
|
for (int i = 0; i < aRanges.length; i++)
|
||||||
a_ranges[i] = ((Integer)(ranges.get (i))).intValue();
|
aRanges[i] = ranges.get (i).intValue();
|
||||||
|
|
||||||
a_attributes = new HashMap[attributes.size()];
|
aAttributes = new ArrayList<Map<Attribute,Object>>(attributes);
|
||||||
System.arraycopy(attributes.toArray(), 0, a_attributes, 0, a_attributes.length);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -235,17 +238,17 @@ public class AttributedFormatBuffer implements FormatBuffer
|
||||||
*/
|
*/
|
||||||
public int[] getRanges()
|
public int[] getRanges()
|
||||||
{
|
{
|
||||||
return a_ranges;
|
return aRanges;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method returns the array containing the map on the
|
* This method returns the array containing the map on the
|
||||||
* attributes.
|
* attributes.
|
||||||
*
|
*
|
||||||
* @return An array of {@link java.util.Map} containing the attributes.
|
* @return A {@link java.util.List} of {@link java.util.Map}s containing the attributes.
|
||||||
*/
|
*/
|
||||||
public HashMap[] getAttributes()
|
public List<Map<Attribute,Object>> getAttributes()
|
||||||
{
|
{
|
||||||
return a_attributes;
|
return aAttributes;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* FormatBuffer.java -- General interface to build attributed strings.
|
/* FormatBuffer.java -- General interface to build attributed strings.
|
||||||
Copyright (C) 2004 Free Software Foundation, Inc.
|
Copyright (C) 2004, 2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
@ -37,7 +37,10 @@ exception statement from your version. */
|
||||||
package gnu.java.text;
|
package gnu.java.text;
|
||||||
|
|
||||||
import java.text.AttributedCharacterIterator;
|
import java.text.AttributedCharacterIterator;
|
||||||
import java.util.HashMap;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import static java.text.AttributedCharacterIterator.Attribute;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This interface describes a modifiable buffer which contains attributed
|
* This interface describes a modifiable buffer which contains attributed
|
||||||
|
@ -67,7 +70,7 @@ public interface FormatBuffer
|
||||||
* @param s The string to append to the buffer.
|
* @param s The string to append to the buffer.
|
||||||
* @param attr Attribute to use for the string in the buffer.
|
* @param attr Attribute to use for the string in the buffer.
|
||||||
*/
|
*/
|
||||||
public void append(String s, AttributedCharacterIterator.Attribute attr);
|
public void append(String s, Attribute attr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method appends a simple string to the buffer. This part of
|
* This method appends a simple string to the buffer. This part of
|
||||||
|
@ -79,7 +82,7 @@ public interface FormatBuffer
|
||||||
* to the string.
|
* to the string.
|
||||||
* @param attrs The attributes of the string in the buffer.
|
* @param attrs The attributes of the string in the buffer.
|
||||||
*/
|
*/
|
||||||
public void append(String s, int[] ranges, HashMap[] attrs);
|
public void append(String s, int[] ranges, List<Map<Attribute,Object>> attrs);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method appends a simple char to the buffer. This part of
|
* This method appends a simple char to the buffer. This part of
|
||||||
|
@ -97,7 +100,7 @@ public interface FormatBuffer
|
||||||
* @param c The character to append to the buffer.
|
* @param c The character to append to the buffer.
|
||||||
* @param attr Attribute to use for the character in the buffer.
|
* @param attr Attribute to use for the character in the buffer.
|
||||||
*/
|
*/
|
||||||
public void append(char c, AttributedCharacterIterator.Attribute attr);
|
public void append(char c, Attribute attr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method changes the current default attribute for the next string
|
* This method changes the current default attribute for the next string
|
||||||
|
@ -105,14 +108,14 @@ public interface FormatBuffer
|
||||||
*
|
*
|
||||||
* @param attr The attribute which will be used by default.
|
* @param attr The attribute which will be used by default.
|
||||||
*/
|
*/
|
||||||
public void setDefaultAttribute(AttributedCharacterIterator.Attribute attr);
|
public void setDefaultAttribute(Attribute attr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method returns the current default attribute for the buffer.
|
* This method returns the current default attribute for the buffer.
|
||||||
*
|
*
|
||||||
* @return The default attribute for the buffer.
|
* @return The default attribute for the buffer.
|
||||||
*/
|
*/
|
||||||
public AttributedCharacterIterator.Attribute getDefaultAttribute();
|
public Attribute getDefaultAttribute();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method cuts the last characters of the buffer. The number of
|
* This method cuts the last characters of the buffer. The number of
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* FormatCharacter.java -- Implementation of AttributedCharacterIterator for
|
/* FormatCharacter.java -- Implementation of AttributedCharacterIterator for
|
||||||
formatters.
|
formatters.
|
||||||
Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
|
Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
@ -38,12 +38,15 @@ exception statement from your version. */
|
||||||
package gnu.java.text;
|
package gnu.java.text;
|
||||||
|
|
||||||
import java.text.AttributedCharacterIterator;
|
import java.text.AttributedCharacterIterator;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.Vector;
|
|
||||||
|
import static java.text.AttributedCharacterIterator.Attribute;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class should not be put public and it is only intended to the
|
* This class should not be put public and it is only intended to the
|
||||||
|
@ -62,7 +65,7 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
|
||||||
private int charIndex;
|
private int charIndex;
|
||||||
private int attributeIndex;
|
private int attributeIndex;
|
||||||
private int[] ranges;
|
private int[] ranges;
|
||||||
private HashMap[] attributes;
|
private List<Map<Attribute,Object>> attributes;
|
||||||
private static final boolean DEBUG = false;
|
private static final boolean DEBUG = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -74,7 +77,7 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
|
||||||
{
|
{
|
||||||
formattedString = "";
|
formattedString = "";
|
||||||
ranges = new int[0];
|
ranges = new int[0];
|
||||||
attributes = new HashMap[0];
|
attributes = new ArrayList<Map<Attribute,Object>>(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -87,12 +90,13 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
|
||||||
* <pre>
|
* <pre>
|
||||||
* s = "hello";
|
* s = "hello";
|
||||||
* ranges = new int[] { 2, 6 };
|
* ranges = new int[] { 2, 6 };
|
||||||
* attributes = new HashMap[2];
|
* attributes = new ArrayList<Map<Attribute,Object>>(2);
|
||||||
* </pre>
|
* </pre>
|
||||||
* <code>"he"</code> will have the attributes <code>attributes[0]</code>,
|
* <code>"he"</code> will have the attributes <code>attributes.get(0)</code>,
|
||||||
* <code>"llo"</code> the <code>attributes[1]</code>.
|
* <code>"llo"</code> the <code>attributes.get(1)</code>.
|
||||||
*/
|
*/
|
||||||
public FormatCharacterIterator (String s, int[] ranges, HashMap[] attributes)
|
public FormatCharacterIterator (String s, int[] ranges,
|
||||||
|
List<Map<Attribute,Object>> attributes)
|
||||||
{
|
{
|
||||||
formattedString = s;
|
formattedString = s;
|
||||||
this.ranges = ranges;
|
this.ranges = ranges;
|
||||||
|
@ -104,55 +108,57 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
|
||||||
* and thus are already documented.
|
* and thus are already documented.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public Set getAllAttributeKeys()
|
public Set<Attribute> getAllAttributeKeys()
|
||||||
{
|
{
|
||||||
if (attributes != null && attributes[attributeIndex] != null)
|
if (attributes != null && attributes.get(attributeIndex) != null)
|
||||||
return attributes[attributeIndex].keySet();
|
return attributes.get(attributeIndex).keySet();
|
||||||
else
|
else
|
||||||
return new HashSet();
|
return new HashSet<Attribute>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map getAttributes()
|
public Map<Attribute,Object> getAttributes()
|
||||||
{
|
{
|
||||||
if (attributes != null && attributes[attributeIndex] != null)
|
if (attributes != null && attributes.get(attributeIndex) != null)
|
||||||
return attributes[attributeIndex];
|
return attributes.get(attributeIndex);
|
||||||
else
|
else
|
||||||
return new HashMap();
|
return new HashMap<Attribute,Object>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object getAttribute (AttributedCharacterIterator.Attribute attrib)
|
public Object getAttribute (Attribute attrib)
|
||||||
{
|
{
|
||||||
if (attributes != null && attributes[attributeIndex] != null)
|
if (attributes != null && attributes.get(attributeIndex) != null)
|
||||||
return attributes[attributeIndex].get (attrib);
|
return attributes.get(attributeIndex).get (attrib);
|
||||||
else
|
else
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getRunLimit(Set reqAttrs)
|
public int getRunLimit(Set<? extends Attribute> reqAttrs)
|
||||||
{
|
{
|
||||||
if (attributes == null)
|
if (attributes == null)
|
||||||
return formattedString.length();
|
return formattedString.length();
|
||||||
|
|
||||||
int currentAttrIndex = attributeIndex;
|
int currentAttrIndex = attributeIndex;
|
||||||
Set newKeys;
|
Set<Attribute> newKeys;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
currentAttrIndex++;
|
currentAttrIndex++;
|
||||||
if (currentAttrIndex == attributes.length)
|
if (currentAttrIndex == attributes.size())
|
||||||
return formattedString.length();
|
return formattedString.length();
|
||||||
if (attributes[currentAttrIndex] == null)
|
Map<Attribute,Object> currentAttr =
|
||||||
|
attributes.get(currentAttrIndex);
|
||||||
|
if (currentAttr == null)
|
||||||
break;
|
break;
|
||||||
newKeys = attributes[currentAttrIndex].keySet();
|
newKeys = currentAttr.keySet();
|
||||||
}
|
}
|
||||||
while (newKeys.containsAll (reqAttrs));
|
while (newKeys.containsAll (reqAttrs));
|
||||||
|
|
||||||
return ranges[currentAttrIndex-1];
|
return ranges[currentAttrIndex-1];
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getRunLimit (AttributedCharacterIterator.Attribute attribute)
|
public int getRunLimit (Attribute attribute)
|
||||||
{
|
{
|
||||||
Set s = new HashSet();
|
Set<Attribute> s = new HashSet<Attribute>();
|
||||||
|
|
||||||
s.add (attribute);
|
s.add (attribute);
|
||||||
return getRunLimit (s);
|
return getRunLimit (s);
|
||||||
|
@ -162,24 +168,24 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
|
||||||
{
|
{
|
||||||
if (attributes == null)
|
if (attributes == null)
|
||||||
return formattedString.length();
|
return formattedString.length();
|
||||||
if (attributes[attributeIndex] == null)
|
if (attributes.get(attributeIndex) == null)
|
||||||
{
|
{
|
||||||
for (int i=attributeIndex+1;i<attributes.length;i++)
|
for (int i=attributeIndex+1;i<attributes.size();i++)
|
||||||
if (attributes[i] != null)
|
if (attributes.get(i) != null)
|
||||||
return ranges[i-1];
|
return ranges[i-1];
|
||||||
return formattedString.length();
|
return formattedString.length();
|
||||||
}
|
}
|
||||||
|
|
||||||
return getRunLimit (attributes[attributeIndex].keySet());
|
return getRunLimit (attributes.get(attributeIndex).keySet());
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getRunStart (Set reqAttrs)
|
public int getRunStart (Set<? extends Attribute> reqAttrs)
|
||||||
{
|
{
|
||||||
if (attributes == null)
|
if (attributes == null)
|
||||||
return formattedString.length();
|
return formattedString.length();
|
||||||
|
|
||||||
int currentAttrIndex = attributeIndex;
|
int currentAttrIndex = attributeIndex;
|
||||||
Set newKeys = null;
|
Set<Attribute> newKeys = null;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
@ -187,9 +193,11 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
currentAttrIndex--;
|
currentAttrIndex--;
|
||||||
if (attributes[currentAttrIndex] == null)
|
Map<Attribute,Object> currentAttr =
|
||||||
|
attributes.get(currentAttrIndex);
|
||||||
|
if (currentAttr == null)
|
||||||
break;
|
break;
|
||||||
newKeys = attributes[currentAttrIndex].keySet();
|
newKeys = currentAttr.keySet();
|
||||||
}
|
}
|
||||||
while (newKeys.containsAll (reqAttrs));
|
while (newKeys.containsAll (reqAttrs));
|
||||||
|
|
||||||
|
@ -201,20 +209,21 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
|
||||||
if (attributes == null)
|
if (attributes == null)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (attributes[attributeIndex] == null)
|
Map<Attribute,Object> attrib = attributes.get(attributeIndex);
|
||||||
|
if (attrib == null)
|
||||||
{
|
{
|
||||||
for (int i=attributeIndex;i>0;i--)
|
for (int i=attributeIndex;i>0;i--)
|
||||||
if (attributes[i] != null)
|
if (attributes.get(i) != null)
|
||||||
return ranges[attributeIndex-1];
|
return ranges[attributeIndex-1];
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return getRunStart (attributes[attributeIndex].keySet());
|
return getRunStart (attrib.keySet());
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getRunStart (AttributedCharacterIterator.Attribute attribute)
|
public int getRunStart (Attribute attribute)
|
||||||
{
|
{
|
||||||
Set s = new HashSet();
|
Set<Attribute> s = new HashSet<Attribute>();
|
||||||
|
|
||||||
s.add (attribute);
|
s.add (attribute);
|
||||||
return getRunStart (s);
|
return getRunStart (s);
|
||||||
|
@ -261,7 +270,7 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
|
||||||
{
|
{
|
||||||
charIndex = formattedString.length()-1;
|
charIndex = formattedString.length()-1;
|
||||||
if (attributes != null)
|
if (attributes != null)
|
||||||
attributeIndex = attributes.length-1;
|
attributeIndex = attributes.size()-1;
|
||||||
return formattedString.charAt (charIndex);
|
return formattedString.charAt (charIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -306,7 +315,7 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
|
||||||
charIndex = position;
|
charIndex = position;
|
||||||
if (attributes != null)
|
if (attributes != null)
|
||||||
{
|
{
|
||||||
for (attributeIndex=0;attributeIndex<attributes.length;
|
for (attributeIndex=0;attributeIndex<attributes.size();
|
||||||
attributeIndex++)
|
attributeIndex++)
|
||||||
if (ranges[attributeIndex] > charIndex)
|
if (ranges[attributeIndex] > charIndex)
|
||||||
break;
|
break;
|
||||||
|
@ -327,40 +336,42 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
|
||||||
*
|
*
|
||||||
* @param attributes the new array attributes to apply to the string.
|
* @param attributes the new array attributes to apply to the string.
|
||||||
*/
|
*/
|
||||||
public void mergeAttributes (HashMap[] attributes, int[] ranges)
|
public void mergeAttributes (List<Map<Attribute,Object>> attributes,
|
||||||
|
int[] ranges)
|
||||||
{
|
{
|
||||||
Vector new_ranges = new Vector();
|
List<Integer> newRanges = new ArrayList<Integer>();
|
||||||
Vector new_attributes = new Vector();
|
List<Map<Attribute,Object>> newAttributes =
|
||||||
|
new ArrayList<Map<Attribute,Object>>();
|
||||||
int i = 0, j = 0;
|
int i = 0, j = 0;
|
||||||
|
|
||||||
debug("merging " + attributes.length + " attrs");
|
debug("merging " + attributes.size() + " attrs");
|
||||||
|
|
||||||
while (i < this.ranges.length && j < ranges.length)
|
while (i < this.ranges.length && j < ranges.length)
|
||||||
{
|
{
|
||||||
if (this.attributes[i] != null)
|
if (this.attributes.get(i) != null)
|
||||||
{
|
{
|
||||||
new_attributes.add (this.attributes[i]);
|
newAttributes.add (this.attributes.get(i));
|
||||||
if (attributes[j] != null)
|
if (attributes.get(j) != null)
|
||||||
this.attributes[i].putAll (attributes[j]);
|
this.attributes.get(i).putAll (attributes.get(j));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
new_attributes.add (attributes[j]);
|
newAttributes.add (attributes.get(j));
|
||||||
}
|
}
|
||||||
if (this.ranges[i] == ranges[j])
|
if (this.ranges[i] == ranges[j])
|
||||||
{
|
{
|
||||||
new_ranges.add (new Integer (ranges[j]));
|
newRanges.add (Integer.valueOf (ranges[j]));
|
||||||
i++;
|
i++;
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
else if (this.ranges[i] < ranges[j])
|
else if (this.ranges[i] < ranges[j])
|
||||||
{
|
{
|
||||||
new_ranges.add (new Integer (this.ranges[i]));
|
newRanges.add (Integer.valueOf (this.ranges[i]));
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
new_ranges.add (new Integer (ranges[j]));
|
newRanges.add (Integer.valueOf (ranges[j]));
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -369,27 +380,25 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
|
||||||
{
|
{
|
||||||
for (;i<this.ranges.length;i++)
|
for (;i<this.ranges.length;i++)
|
||||||
{
|
{
|
||||||
new_attributes.add (this.attributes[i]);
|
newAttributes.add (this.attributes.get(i));
|
||||||
new_ranges.add (new Integer (this.ranges[i]));
|
newRanges.add (Integer.valueOf (this.ranges[i]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (j != ranges.length)
|
if (j != ranges.length)
|
||||||
{
|
{
|
||||||
for (;j<ranges.length;j++)
|
for (;j<ranges.length;j++)
|
||||||
{
|
{
|
||||||
new_attributes.add (attributes[j]);
|
newAttributes.add (attributes.get(j));
|
||||||
new_ranges.add (new Integer (ranges[j]));
|
newRanges.add (Integer.valueOf (ranges[j]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.attributes = new HashMap[new_attributes.size()];
|
this.attributes = newAttributes;
|
||||||
this.ranges = new int[new_ranges.size()];
|
this.ranges = new int[newRanges.size()];
|
||||||
System.arraycopy (new_attributes.toArray(), 0, this.attributes,
|
|
||||||
0, this.attributes.length);
|
|
||||||
|
|
||||||
for (i=0;i<new_ranges.size();i++)
|
for (i=0;i<newRanges.size();i++)
|
||||||
{
|
{
|
||||||
this.ranges[i] = ((Integer)new_ranges.elementAt (i)).intValue();
|
this.ranges[i] = newRanges.get (i).intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
dumpTable();
|
dumpTable();
|
||||||
|
@ -405,35 +414,35 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
|
||||||
public void append (AttributedCharacterIterator iterator)
|
public void append (AttributedCharacterIterator iterator)
|
||||||
{
|
{
|
||||||
char c = iterator.first();
|
char c = iterator.first();
|
||||||
Vector more_ranges = new Vector();
|
List<Integer> moreRanges = new ArrayList<Integer>();
|
||||||
Vector more_attributes = new Vector();
|
List<Map<Attribute,Object>> moreAttributes =
|
||||||
|
new ArrayList<Map<Attribute,Object>>();
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
formattedString = formattedString + String.valueOf (c);
|
formattedString = formattedString + String.valueOf (c);
|
||||||
// TODO: Reduce the size of the output array.
|
// TODO: Reduce the size of the output array.
|
||||||
more_attributes.add (iterator.getAttributes());
|
moreAttributes.add (iterator.getAttributes());
|
||||||
more_ranges.add (new Integer (formattedString.length()));
|
moreRanges.add (Integer.valueOf (formattedString.length()));
|
||||||
// END TOOD
|
// END TOOD
|
||||||
c = iterator.next();
|
c = iterator.next();
|
||||||
}
|
}
|
||||||
while (c != DONE);
|
while (c != DONE);
|
||||||
|
|
||||||
HashMap[] new_attributes = new HashMap[attributes.length
|
List<Map<Attribute,Object>> newAttributes =
|
||||||
+ more_attributes.size()];
|
new ArrayList<Map<Attribute,Object>>(attributes.size() + moreAttributes.size());
|
||||||
int[] new_ranges = new int[ranges.length + more_ranges.size()];
|
int[] newRanges = new int[ranges.length + moreRanges.size()];
|
||||||
|
|
||||||
System.arraycopy (attributes, 0, new_attributes, 0, attributes.length);
|
newAttributes.addAll(attributes);
|
||||||
System.arraycopy (more_attributes.toArray(), 0, new_attributes,
|
newAttributes.addAll(moreAttributes);
|
||||||
attributes.length, more_attributes.size());
|
|
||||||
|
|
||||||
System.arraycopy (ranges, 0, new_ranges, 0, ranges.length);
|
System.arraycopy (ranges, 0, newRanges, 0, ranges.length);
|
||||||
Object[] new_ranges_array = more_ranges.toArray();
|
Integer[] newRangesArray = moreRanges.toArray(new Integer[moreRanges.size()]);
|
||||||
for (int i = 0; i < more_ranges.size();i++)
|
for (int i = 0; i < moreRanges.size();i++)
|
||||||
new_ranges[i+ranges.length] = ((Integer) new_ranges_array[i]).intValue();
|
newRanges[i+ranges.length] = newRangesArray[i].intValue();
|
||||||
|
|
||||||
attributes = new_attributes;
|
attributes = newAttributes;
|
||||||
ranges = new_ranges;
|
ranges = newRanges;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -441,28 +450,29 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
|
||||||
* directly in the calling parameters.
|
* directly in the calling parameters.
|
||||||
*
|
*
|
||||||
* @param text The string to append.
|
* @param text The string to append.
|
||||||
* @param local_attributes The attributes to put on this string in the
|
* @param localAttributes The attributes to put on this string in the
|
||||||
* iterator. If it is <code>null</code> the string will simply have no
|
* iterator. If it is <code>null</code> the string will simply have no
|
||||||
* attributes.
|
* attributes.
|
||||||
*/
|
*/
|
||||||
public void append (String text, HashMap local_attributes)
|
public void append (String text, HashMap<? extends Attribute,? extends Object> localAttributes)
|
||||||
{
|
{
|
||||||
int[] new_ranges = new int[ranges.length+1];
|
int[] newRanges = new int[ranges.length+1];
|
||||||
HashMap[] new_attributes = new HashMap[attributes.length+1];
|
List<Map<Attribute,Object>> newAttributes =
|
||||||
|
new ArrayList<Map<Attribute,Object>>(attributes.size()+1);
|
||||||
|
|
||||||
formattedString += text;
|
formattedString += text;
|
||||||
System.arraycopy (attributes, 0, new_attributes, 0, attributes.length);
|
newAttributes.addAll(attributes);
|
||||||
System.arraycopy (ranges, 0, new_ranges, 0, ranges.length);
|
System.arraycopy (ranges, 0, newRanges, 0, ranges.length);
|
||||||
new_ranges[ranges.length] = formattedString.length();
|
newRanges[ranges.length] = formattedString.length();
|
||||||
new_attributes[attributes.length] = local_attributes;
|
newAttributes.add(new HashMap<Attribute,Object>(localAttributes));
|
||||||
|
|
||||||
ranges = new_ranges;
|
ranges = newRanges;
|
||||||
attributes = new_attributes;
|
attributes = newAttributes;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method appends a string without attributes. It is completely
|
* This method appends a string without attributes. It is completely
|
||||||
* equivalent to call {@link #append(String,HashMap)} with local_attributes
|
* equivalent to call {@link #append(String,HashMap)} with localAttributes
|
||||||
* equal to <code>null</code>.
|
* equal to <code>null</code>.
|
||||||
*
|
*
|
||||||
* @param text The string to append to the iterator.
|
* @param text The string to append to the iterator.
|
||||||
|
@ -475,22 +485,31 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
|
||||||
/**
|
/**
|
||||||
* This method adds a set of attributes to a range of character. The
|
* This method adds a set of attributes to a range of character. The
|
||||||
* bounds are always inclusive. In the case many attributes have to
|
* bounds are always inclusive. In the case many attributes have to
|
||||||
* be added it is advised to directly use {@link #mergeAttributes([Ljava.util.HashMap;[I}
|
* be added it is advised to directly use {@link #mergeAttributes(java.util.List;[I}
|
||||||
*
|
*
|
||||||
* @param attributes Attributes to merge into the iterator.
|
* @param attributes Attributes to merge into the iterator.
|
||||||
* @param range_start Lower bound of the range of characters which will receive the
|
* @param rangeStart Lower bound of the range of characters which will receive the
|
||||||
* attribute.
|
* attribute.
|
||||||
* @param range_end Upper bound of the range of characters which will receive the
|
* @param rangeEnd Upper bound of the range of characters which will receive the
|
||||||
* attribute.
|
* attribute.
|
||||||
*
|
*
|
||||||
* @throws IllegalArgumentException if ranges are out of bounds.
|
* @throws IllegalArgumentException if ranges are out of bounds.
|
||||||
*/
|
*/
|
||||||
public void addAttributes(HashMap attributes, int range_start, int range_end)
|
public void addAttributes(Map<? extends Attribute,? extends Object> attributes,
|
||||||
|
int rangeStart, int rangeEnd)
|
||||||
{
|
{
|
||||||
if (range_start == 0)
|
List<Map<Attribute,Object>> mergeAttribs = new ArrayList<Map<Attribute,Object>>();
|
||||||
mergeAttributes(new HashMap[] { attributes }, new int[] { range_end });
|
int[] mergeRanges;
|
||||||
|
|
||||||
|
if (rangeStart == 0)
|
||||||
|
mergeRanges = new int[] { rangeEnd };
|
||||||
else
|
else
|
||||||
mergeAttributes(new HashMap[] { null, attributes }, new int[] { range_start, range_end });
|
{
|
||||||
|
mergeRanges = new int[] { rangeStart, rangeEnd };
|
||||||
|
mergeAttribs.add(null);
|
||||||
|
}
|
||||||
|
mergeAttribs.add(new HashMap<Attribute,Object>(attributes));
|
||||||
|
mergeAttributes(mergeAttribs, mergeRanges);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void debug(String s)
|
private void debug(String s)
|
||||||
|
@ -501,7 +520,7 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
|
||||||
|
|
||||||
private void dumpTable()
|
private void dumpTable()
|
||||||
{
|
{
|
||||||
int start_range = 0;
|
int startRange = 0;
|
||||||
|
|
||||||
if (!DEBUG)
|
if (!DEBUG)
|
||||||
return;
|
return;
|
||||||
|
@ -509,15 +528,15 @@ public class FormatCharacterIterator implements AttributedCharacterIterator
|
||||||
System.out.println("Dumping internal table:");
|
System.out.println("Dumping internal table:");
|
||||||
for (int i = 0; i < ranges.length; i++)
|
for (int i = 0; i < ranges.length; i++)
|
||||||
{
|
{
|
||||||
System.out.print("\t" + start_range + " => " + ranges[i] + ":");
|
System.out.print("\t" + startRange + " => " + ranges[i] + ":");
|
||||||
if (attributes[i] == null)
|
if (attributes.get(i) == null)
|
||||||
System.out.println("null");
|
System.out.println("null");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Set keyset = attributes[i].keySet();
|
Set<Attribute> keyset = attributes.get(i).keySet();
|
||||||
if (keyset != null)
|
if (keyset != null)
|
||||||
{
|
{
|
||||||
Iterator keys = keyset.iterator();
|
Iterator<Attribute> keys = keyset.iterator();
|
||||||
|
|
||||||
while (keys.hasNext())
|
while (keys.hasNext())
|
||||||
System.out.print(" " + keys.next());
|
System.out.print(" " + keys.next());
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* StringFormatBuffer.java -- Implements FormatBuffer using StringBuffer.
|
/* StringFormatBuffer.java -- Implements FormatBuffer using StringBuffer.
|
||||||
Copyright (C) 2004 Free Software Foundation, Inc.
|
Copyright (C) 2004, 2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
@ -37,7 +37,10 @@ exception statement from your version. */
|
||||||
package gnu.java.text;
|
package gnu.java.text;
|
||||||
|
|
||||||
import java.text.AttributedCharacterIterator;
|
import java.text.AttributedCharacterIterator;
|
||||||
import java.util.HashMap;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import static java.text.AttributedCharacterIterator.Attribute;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is an implementation of a FormatBuffer without attributes.
|
* This class is an implementation of a FormatBuffer without attributes.
|
||||||
|
@ -48,7 +51,7 @@ import java.util.HashMap;
|
||||||
public class StringFormatBuffer implements FormatBuffer
|
public class StringFormatBuffer implements FormatBuffer
|
||||||
{
|
{
|
||||||
private final StringBuffer buffer;
|
private final StringBuffer buffer;
|
||||||
private AttributedCharacterIterator.Attribute defaultAttr;
|
private Attribute defaultAttr;
|
||||||
|
|
||||||
public StringFormatBuffer(int prebuffer)
|
public StringFormatBuffer(int prebuffer)
|
||||||
{
|
{
|
||||||
|
@ -65,12 +68,12 @@ public class StringFormatBuffer implements FormatBuffer
|
||||||
buffer.append(s);
|
buffer.append(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void append(String s, AttributedCharacterIterator.Attribute attr)
|
public void append(String s, Attribute attr)
|
||||||
{
|
{
|
||||||
buffer.append(s);
|
buffer.append(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void append(String s, int[] ranges, HashMap[] attrs)
|
public void append(String s, int[] ranges, List<Map<Attribute,Object>> attrs)
|
||||||
{
|
{
|
||||||
buffer.append(s);
|
buffer.append(s);
|
||||||
}
|
}
|
||||||
|
@ -80,17 +83,17 @@ public class StringFormatBuffer implements FormatBuffer
|
||||||
buffer.append(c);
|
buffer.append(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void append(char c, AttributedCharacterIterator.Attribute attr)
|
public void append(char c, Attribute attr)
|
||||||
{
|
{
|
||||||
buffer.append(c);
|
buffer.append(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setDefaultAttribute(AttributedCharacterIterator.Attribute attr)
|
public void setDefaultAttribute(Attribute attr)
|
||||||
{
|
{
|
||||||
defaultAttr = attr;
|
defaultAttr = attr;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AttributedCharacterIterator.Attribute getDefaultAttribute()
|
public Attribute getDefaultAttribute()
|
||||||
{
|
{
|
||||||
return defaultAttr;
|
return defaultAttr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* DSSIMidiDeviceProvider.java -- DSSI Device Provider
|
/* DSSIMidiDeviceProvider.java -- DSSI Device Provider
|
||||||
Copyright (C) 2005 Free Software Foundation, Inc.
|
Copyright (C) 2005, 2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
@ -69,13 +69,16 @@ public class DSSIMidiDeviceProvider extends MidiDeviceProvider
|
||||||
*/
|
*/
|
||||||
private static class DSSIInfo extends Info
|
private static class DSSIInfo extends Info
|
||||||
{
|
{
|
||||||
|
String copyright;
|
||||||
String soname;
|
String soname;
|
||||||
long index;
|
long index;
|
||||||
|
|
||||||
public DSSIInfo(String name, String vendor, String description,
|
public DSSIInfo(String name, String vendor, String label,
|
||||||
String version, String soname, long index)
|
String copyright, String version,
|
||||||
|
String soname, long index)
|
||||||
{
|
{
|
||||||
super(name, vendor, description, version);
|
super(name, vendor, label, version);
|
||||||
|
this.copyright = copyright;
|
||||||
this.soname = soname;
|
this.soname = soname;
|
||||||
this.index = index;
|
this.index = index;
|
||||||
}
|
}
|
||||||
|
@ -89,9 +92,9 @@ public class DSSIMidiDeviceProvider extends MidiDeviceProvider
|
||||||
static native String getDSSIVendor_(long handle);
|
static native String getDSSIVendor_(long handle);
|
||||||
static native String getDSSILabel_(long handle);
|
static native String getDSSILabel_(long handle);
|
||||||
|
|
||||||
private static List examineLibrary(String soname)
|
private static List<DSSIInfo> examineLibrary(String soname)
|
||||||
{
|
{
|
||||||
List list = new ArrayList();
|
List<DSSIInfo> list = new ArrayList<DSSIInfo>();
|
||||||
long index = 0;
|
long index = 0;
|
||||||
long handle;
|
long handle;
|
||||||
|
|
||||||
|
@ -107,7 +110,7 @@ public class DSSIMidiDeviceProvider extends MidiDeviceProvider
|
||||||
String copyright = getDSSICopyright_(handle);
|
String copyright = getDSSICopyright_(handle);
|
||||||
String label = getDSSIName_(handle);
|
String label = getDSSIName_(handle);
|
||||||
String vendor = getDSSIVendor_(handle);
|
String vendor = getDSSIVendor_(handle);
|
||||||
list.add(new DSSIInfo(name, vendor, label,
|
list.add(new DSSIInfo(name, vendor, label, copyright,
|
||||||
"DSSI-1", soname, index));
|
"DSSI-1", soname, index));
|
||||||
index++;
|
index++;
|
||||||
} while (true);
|
} while (true);
|
||||||
|
@ -133,10 +136,10 @@ public class DSSIMidiDeviceProvider extends MidiDeviceProvider
|
||||||
return n.endsWith(".so");
|
return n.endsWith(".so");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
List ilist = new ArrayList();
|
List<DSSIInfo> ilist = new ArrayList<DSSIInfo>();
|
||||||
for (int i = 0; i < sofiles.length; i++)
|
for (int i = 0; i < sofiles.length; i++)
|
||||||
ilist.addAll(examineLibrary(new File(dssidir, sofiles[i]).getAbsolutePath()));
|
ilist.addAll(examineLibrary(new File(dssidir, sofiles[i]).getAbsolutePath()));
|
||||||
infos = (DSSIInfo[]) ilist.toArray(new DSSIInfo[ilist.size()]);
|
infos = ilist.toArray(new DSSIInfo[ilist.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public DSSIMidiDeviceProvider()
|
public DSSIMidiDeviceProvider()
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* DSSISynthesizer.java -- DSSI Synthesizer Provider
|
/* DSSISynthesizer.java -- DSSI Synthesizer Provider
|
||||||
Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
Copyright (C) 2005, 2006, 2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
@ -97,8 +97,8 @@ public class DSSISynthesizer implements Synthesizer
|
||||||
{
|
{
|
||||||
private String name;
|
private String name;
|
||||||
private String description;
|
private String description;
|
||||||
private List instruments = new ArrayList();
|
private List<Instrument> instruments = new ArrayList<Instrument>();
|
||||||
private List resources = new ArrayList();
|
private List<SoundbankResource> resources = new ArrayList<SoundbankResource>();
|
||||||
private String vendor;
|
private String vendor;
|
||||||
private String version;
|
private String version;
|
||||||
|
|
||||||
|
@ -147,27 +147,25 @@ public class DSSISynthesizer implements Synthesizer
|
||||||
*/
|
*/
|
||||||
public SoundbankResource[] getResources()
|
public SoundbankResource[] getResources()
|
||||||
{
|
{
|
||||||
return (SoundbankResource[])
|
return resources.toArray(new SoundbankResource[resources.size()]);
|
||||||
resources.toArray(new SoundbankResource[resources.size()]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* @see javax.sound.midi.Soundbank#getInstruments()
|
/* @see javax.sound.midi.Soundbank#getInstruments()
|
||||||
*/
|
*/
|
||||||
public Instrument[] getInstruments()
|
public Instrument[] getInstruments()
|
||||||
{
|
{
|
||||||
return (Instrument[])
|
return instruments.toArray(new Instrument[instruments.size()]);
|
||||||
instruments.toArray(new Instrument[instruments.size()]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* @see javax.sound.midi.Soundbank#getInstrument(javax.sound.midi.Patch)
|
/* @see javax.sound.midi.Soundbank#getInstrument(javax.sound.midi.Patch)
|
||||||
*/
|
*/
|
||||||
public Instrument getInstrument(Patch patch)
|
public Instrument getInstrument(Patch patch)
|
||||||
{
|
{
|
||||||
Iterator itr = instruments.iterator();
|
Iterator<Instrument> itr = instruments.iterator();
|
||||||
|
|
||||||
while (itr.hasNext())
|
while (itr.hasNext())
|
||||||
{
|
{
|
||||||
Instrument i = (Instrument) itr.next();
|
Instrument i = itr.next();
|
||||||
if (i.getPatch().equals(patch))
|
if (i.getPatch().equals(patch))
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
@ -490,7 +488,7 @@ public class DSSISynthesizer implements Synthesizer
|
||||||
MidiChannel channels[] = new MidiChannel[16];
|
MidiChannel channels[] = new MidiChannel[16];
|
||||||
|
|
||||||
// The list of known soundbanks, and the default one.
|
// The list of known soundbanks, and the default one.
|
||||||
List soundbanks = new ArrayList();
|
List<Soundbank> soundbanks = new ArrayList<Soundbank>();
|
||||||
DSSISoundbank defaultSoundbank;
|
DSSISoundbank defaultSoundbank;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -616,17 +614,16 @@ public class DSSISynthesizer implements Synthesizer
|
||||||
*/
|
*/
|
||||||
public Instrument[] getAvailableInstruments()
|
public Instrument[] getAvailableInstruments()
|
||||||
{
|
{
|
||||||
List instruments = new ArrayList();
|
List<Instrument> instruments = new ArrayList<Instrument>();
|
||||||
Iterator itr = soundbanks.iterator();
|
Iterator<Soundbank> itr = soundbanks.iterator();
|
||||||
while (itr.hasNext())
|
while (itr.hasNext())
|
||||||
{
|
{
|
||||||
Soundbank sb = (Soundbank) itr.next();
|
Soundbank sb = itr.next();
|
||||||
Instrument ins[] = sb.getInstruments();
|
Instrument ins[] = sb.getInstruments();
|
||||||
for (int i = 0; i < ins.length; i++)
|
for (int i = 0; i < ins.length; i++)
|
||||||
instruments.add(ins[i]);
|
instruments.add(ins[i]);
|
||||||
}
|
}
|
||||||
return (Instrument[])
|
return instruments.toArray(new Instrument[instruments.size()]);
|
||||||
instruments.toArray(new Instrument[instruments.size()]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* MidiFileReader.java -- Read MIDI files.
|
/* MidiFileReader.java -- Read MIDI files.
|
||||||
Copyright (C) 2006 Free Software Foundation, Inc.
|
Copyright (C) 2006, 2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
@ -198,7 +198,7 @@ public class MidiFileReader extends javax.sound.midi.spi.MidiFileReader
|
||||||
int Mtrk = din.readInt();
|
int Mtrk = din.readInt();
|
||||||
if (Mtrk != 0x4d54726b)
|
if (Mtrk != 0x4d54726b)
|
||||||
throw new InvalidMidiDataException("Invalid MIDI track header.");
|
throw new InvalidMidiDataException("Invalid MIDI track header.");
|
||||||
int length = din.readInt();
|
din.readInt(); // length
|
||||||
|
|
||||||
int runningStatus = -1;
|
int runningStatus = -1;
|
||||||
int click = 0;
|
int click = 0;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* MidiFileWriter.java -- Write MIDI files.
|
/* MidiFileWriter.java -- Write MIDI files.
|
||||||
Copyright (C) 2006 Free Software Foundation, Inc.
|
Copyright (C) 2006, 2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ public class MidiFileWriter
|
||||||
*/
|
*/
|
||||||
private int computeTrackLength(Track track, MidiDataOutputStream dos)
|
private int computeTrackLength(Track track, MidiDataOutputStream dos)
|
||||||
{
|
{
|
||||||
int count = 0, length = 0, i = 0, eventCount = track.size();
|
int length = 0, i = 0, eventCount = track.size();
|
||||||
long ptick = 0;
|
long ptick = 0;
|
||||||
while (i < eventCount)
|
while (i < eventCount)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* WAVReader.java -- Read WAV files.
|
/* WAVReader.java -- Read WAV files.
|
||||||
Copyright (C) 2006 Free Software Foundation, Inc.
|
Copyright (C) 2006, 2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ public class WAVReader extends AudioFileReader
|
||||||
boolean foundFmt = false;
|
boolean foundFmt = false;
|
||||||
boolean foundData = false;
|
boolean foundData = false;
|
||||||
|
|
||||||
short compressionCode = 0, numberChannels = 0, blockAlign = 0, bitsPerSample = 0;
|
short compressionCode = 0, numberChannels = 0, bitsPerSample = 0;
|
||||||
long sampleRate = 0, bytesPerSecond = 0;
|
long sampleRate = 0, bytesPerSecond = 0;
|
||||||
long chunkLength = 0;
|
long chunkLength = 0;
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ public class WAVReader extends AudioFileReader
|
||||||
numberChannels = readUnsignedShortLE(din);
|
numberChannels = readUnsignedShortLE(din);
|
||||||
sampleRate = readUnsignedIntLE(din);
|
sampleRate = readUnsignedIntLE(din);
|
||||||
bytesPerSecond = readUnsignedIntLE(din);
|
bytesPerSecond = readUnsignedIntLE(din);
|
||||||
blockAlign = readUnsignedShortLE(din);
|
readUnsignedShortLE(din); // blockAlign
|
||||||
bitsPerSample = readUnsignedShortLE(din);
|
bitsPerSample = readUnsignedShortLE(din);
|
||||||
din.skip(chunkLength - 16);
|
din.skip(chunkLength - 16);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* GStreamerMixer.java -- Mixer implementation.
|
/* GStreamerMixer.java -- Mixer implementation.
|
||||||
Copyright (C) 2007 Free Software Foundation, Inc.
|
Copyright (C) 2007, 2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ public class GStreamerMixer
|
||||||
// and see if there is one matching the given line
|
// and see if there is one matching the given line
|
||||||
// if the format comes from the gstreamer backend
|
// if the format comes from the gstreamer backend
|
||||||
// gstreamer will be able to deal with it
|
// gstreamer will be able to deal with it
|
||||||
Class clazz = info.getLineClass();
|
Class<?> clazz = info.getLineClass();
|
||||||
DataLine.Info _info = (DataLine.Info) info;
|
DataLine.Info _info = (DataLine.Info) info;
|
||||||
|
|
||||||
if (clazz == SourceDataLine.class)
|
if (clazz == SourceDataLine.class)
|
||||||
|
|
|
@ -200,7 +200,8 @@ class SAXSerializer
|
||||||
|
|
||||||
public String getValue(String qName)
|
public String getValue(String qName)
|
||||||
{
|
{
|
||||||
return attrs.getNamedItem(qName).getNodeValue();
|
Attr attr = (Attr) attrs.getNamedItem(qName);
|
||||||
|
return (attr == null) ? null : attr.getNodeValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
void serialize(Node node, ContentHandler ch, LexicalHandler lh)
|
void serialize(Node node, ContentHandler ch, LexicalHandler lh)
|
||||||
|
|
|
@ -40,9 +40,6 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
|
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
|
||||||
$(top_srcdir)/../../config/lead-dot.m4 \
|
$(top_srcdir)/../../config/lead-dot.m4 \
|
||||||
$(top_srcdir)/../../config/lib-ld.m4 \
|
|
||||||
$(top_srcdir)/../../config/lib-link.m4 \
|
|
||||||
$(top_srcdir)/../../config/lib-prefix.m4 \
|
|
||||||
$(top_srcdir)/../../config/multi.m4 \
|
$(top_srcdir)/../../config/multi.m4 \
|
||||||
$(top_srcdir)/../../config/no-executables.m4 \
|
$(top_srcdir)/../../config/no-executables.m4 \
|
||||||
$(top_srcdir)/../../config/override.m4 \
|
$(top_srcdir)/../../config/override.m4 \
|
||||||
|
@ -61,7 +58,9 @@ am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
|
||||||
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
|
||||||
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
|
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.m4 \
|
||||||
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
|
$(top_srcdir)/m4/gcc_attribute.m4 $(top_srcdir)/m4/iconv.m4 \
|
||||||
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/configure.ac
|
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
|
||||||
|
$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/pkg.m4 \
|
||||||
|
$(top_srcdir)/configure.ac
|
||||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
$(ACLOCAL_M4)
|
$(ACLOCAL_M4)
|
||||||
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
|
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
|
||||||
|
@ -169,6 +168,7 @@ MAKEINFO = @MAKEINFO@
|
||||||
MKDIR = @MKDIR@
|
MKDIR = @MKDIR@
|
||||||
MKDIR_P = @MKDIR_P@
|
MKDIR_P = @MKDIR_P@
|
||||||
MOC = @MOC@
|
MOC = @MOC@
|
||||||
|
MOC4 = @MOC4@
|
||||||
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
|
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
|
||||||
MOZILLA_LIBS = @MOZILLA_LIBS@
|
MOZILLA_LIBS = @MOZILLA_LIBS@
|
||||||
NM = @NM@
|
NM = @NM@
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# install - install a program, script, or datafile
|
# install - install a program, script, or datafile
|
||||||
|
|
||||||
scriptversion=2011-01-19.21; # UTC
|
scriptversion=2009-04-28.21; # UTC
|
||||||
|
|
||||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||||
|
@ -156,10 +156,6 @@ while test $# -ne 0; do
|
||||||
-s) stripcmd=$stripprog;;
|
-s) stripcmd=$stripprog;;
|
||||||
|
|
||||||
-t) dst_arg=$2
|
-t) dst_arg=$2
|
||||||
# Protect names problematic for `test' and other utilities.
|
|
||||||
case $dst_arg in
|
|
||||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
|
||||||
esac
|
|
||||||
shift;;
|
shift;;
|
||||||
|
|
||||||
-T) no_target_directory=true;;
|
-T) no_target_directory=true;;
|
||||||
|
@ -190,10 +186,6 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||||
fi
|
fi
|
||||||
shift # arg
|
shift # arg
|
||||||
dst_arg=$arg
|
dst_arg=$arg
|
||||||
# Protect names problematic for `test' and other utilities.
|
|
||||||
case $dst_arg in
|
|
||||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
|
||||||
esac
|
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -208,11 +200,7 @@ if test $# -eq 0; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -z "$dir_arg"; then
|
if test -z "$dir_arg"; then
|
||||||
do_exit='(exit $ret); exit $ret'
|
trap '(exit $?); exit' 1 2 13 15
|
||||||
trap "ret=129; $do_exit" 1
|
|
||||||
trap "ret=130; $do_exit" 2
|
|
||||||
trap "ret=141; $do_exit" 13
|
|
||||||
trap "ret=143; $do_exit" 15
|
|
||||||
|
|
||||||
# Set umask so as not to create temps with too-generous modes.
|
# Set umask so as not to create temps with too-generous modes.
|
||||||
# However, 'strip' requires both read and write access to temps.
|
# However, 'strip' requires both read and write access to temps.
|
||||||
|
@ -240,9 +228,9 @@ fi
|
||||||
|
|
||||||
for src
|
for src
|
||||||
do
|
do
|
||||||
# Protect names problematic for `test' and other utilities.
|
# Protect names starting with `-'.
|
||||||
case $src in
|
case $src in
|
||||||
-* | [=\(\)!]) src=./$src;;
|
-*) src=./$src;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if test -n "$dir_arg"; then
|
if test -n "$dir_arg"; then
|
||||||
|
@ -264,7 +252,12 @@ do
|
||||||
echo "$0: no destination specified." >&2
|
echo "$0: no destination specified." >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dst=$dst_arg
|
dst=$dst_arg
|
||||||
|
# Protect names starting with `-'.
|
||||||
|
case $dst in
|
||||||
|
-*) dst=./$dst;;
|
||||||
|
esac
|
||||||
|
|
||||||
# If destination is a directory, append the input filename; won't work
|
# If destination is a directory, append the input filename; won't work
|
||||||
# if double slashes aren't ignored.
|
# if double slashes aren't ignored.
|
||||||
|
@ -392,7 +385,7 @@ do
|
||||||
|
|
||||||
case $dstdir in
|
case $dstdir in
|
||||||
/*) prefix='/';;
|
/*) prefix='/';;
|
||||||
[-=\(\)!]*) prefix='./';;
|
-*) prefix='./';;
|
||||||
*) prefix='';;
|
*) prefix='';;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -410,7 +403,7 @@ do
|
||||||
|
|
||||||
for d
|
for d
|
||||||
do
|
do
|
||||||
test X"$d" = X && continue
|
test -z "$d" && continue
|
||||||
|
|
||||||
prefix=$prefix$d
|
prefix=$prefix$d
|
||||||
if test -d "$prefix"; then
|
if test -d "$prefix"; then
|
||||||
|
|
|
@ -91,18 +91,18 @@ public class Area implements Shape, Cloneable
|
||||||
* Segment vectors containing solid areas and holes
|
* Segment vectors containing solid areas and holes
|
||||||
* This is package-private to avoid an accessor method.
|
* This is package-private to avoid an accessor method.
|
||||||
*/
|
*/
|
||||||
Vector solids;
|
Vector<Segment> solids;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Segment vectors containing solid areas and holes
|
* Segment vectors containing solid areas and holes
|
||||||
* This is package-private to avoid an accessor method.
|
* This is package-private to avoid an accessor method.
|
||||||
*/
|
*/
|
||||||
Vector holes;
|
Vector<Segment> holes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Vector (temporary) storing curve-curve intersections
|
* Vector (temporary) storing curve-curve intersections
|
||||||
*/
|
*/
|
||||||
private Vector cc_intersections;
|
private Vector<double[]> ccIntersections;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Winding rule WIND_NON_ZERO used, after construction,
|
* Winding rule WIND_NON_ZERO used, after construction,
|
||||||
|
@ -115,8 +115,8 @@ public class Area implements Shape, Cloneable
|
||||||
*/
|
*/
|
||||||
public Area()
|
public Area()
|
||||||
{
|
{
|
||||||
solids = new Vector();
|
solids = new Vector<Segment>();
|
||||||
holes = new Vector();
|
holes = new Vector<Segment>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -135,7 +135,7 @@ public class Area implements Shape, Cloneable
|
||||||
{
|
{
|
||||||
this();
|
this();
|
||||||
|
|
||||||
Vector p = makeSegment(s);
|
Vector<Segment> p = makeSegment(s);
|
||||||
|
|
||||||
// empty path
|
// empty path
|
||||||
if (p == null)
|
if (p == null)
|
||||||
|
@ -143,7 +143,7 @@ public class Area implements Shape, Cloneable
|
||||||
|
|
||||||
// delete empty paths
|
// delete empty paths
|
||||||
for (int i = 0; i < p.size(); i++)
|
for (int i = 0; i < p.size(); i++)
|
||||||
if (((Segment) p.elementAt(i)).getSignedArea() == 0.0)
|
if (p.elementAt(i).getSignedArea() == 0.0)
|
||||||
p.remove(i--);
|
p.remove(i--);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -157,12 +157,11 @@ public class Area implements Shape, Cloneable
|
||||||
* 4: Repeat (3) until no segments remain in the list
|
* 4: Repeat (3) until no segments remain in the list
|
||||||
* 5: Remove redundant paths and sort into solids and holes
|
* 5: Remove redundant paths and sort into solids and holes
|
||||||
*/
|
*/
|
||||||
Vector paths = new Vector();
|
|
||||||
Segment v;
|
Segment v;
|
||||||
|
|
||||||
for (int i = 0; i < p.size(); i++)
|
for (int i = 0; i < p.size(); i++)
|
||||||
{
|
{
|
||||||
Segment path = (Segment) p.elementAt(i);
|
Segment path = p.elementAt(i);
|
||||||
createNodesSelf(path);
|
createNodesSelf(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,18 +170,18 @@ public class Area implements Shape, Cloneable
|
||||||
for (int i = 0; i < p.size() - 1; i++)
|
for (int i = 0; i < p.size() - 1; i++)
|
||||||
for (int j = i + 1; j < p.size(); j++)
|
for (int j = i + 1; j < p.size(); j++)
|
||||||
{
|
{
|
||||||
Segment path1 = (Segment) p.elementAt(i);
|
Segment path1 = p.elementAt(i);
|
||||||
Segment path2 = (Segment) p.elementAt(j);
|
Segment path2 = p.elementAt(j);
|
||||||
createNodes(path1, path2);
|
createNodes(path1, path2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// we have intersecting points.
|
// we have intersecting points.
|
||||||
Vector segments = new Vector();
|
Vector<Segment> segments = new Vector<Segment>();
|
||||||
|
|
||||||
for (int i = 0; i < p.size(); i++)
|
for (int i = 0; i < p.size(); i++)
|
||||||
{
|
{
|
||||||
Segment path = v = (Segment) p.elementAt(i);
|
Segment path = v = p.elementAt(i);
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
segments.add(v);
|
segments.add(v);
|
||||||
|
@ -191,7 +190,7 @@ public class Area implements Shape, Cloneable
|
||||||
while (v != path);
|
while (v != path);
|
||||||
}
|
}
|
||||||
|
|
||||||
paths = weilerAtherton(segments);
|
Vector<Segment> paths = weilerAtherton(segments);
|
||||||
deleteRedundantPaths(paths);
|
deleteRedundantPaths(paths);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,36 +207,34 @@ public class Area implements Shape, Cloneable
|
||||||
|
|
||||||
Area B = (Area) area.clone();
|
Area B = (Area) area.clone();
|
||||||
|
|
||||||
Vector pathA = new Vector();
|
Vector<Segment> pathA = new Vector<Segment>();
|
||||||
Vector pathB = new Vector();
|
Vector<Segment> pathB = new Vector<Segment>();
|
||||||
pathA.addAll(solids);
|
pathA.addAll(solids);
|
||||||
pathA.addAll(holes);
|
pathA.addAll(holes);
|
||||||
pathB.addAll(B.solids);
|
pathB.addAll(B.solids);
|
||||||
pathB.addAll(B.holes);
|
pathB.addAll(B.holes);
|
||||||
|
|
||||||
int nNodes = 0;
|
|
||||||
|
|
||||||
for (int i = 0; i < pathA.size(); i++)
|
for (int i = 0; i < pathA.size(); i++)
|
||||||
{
|
{
|
||||||
Segment a = (Segment) pathA.elementAt(i);
|
Segment a = pathA.elementAt(i);
|
||||||
for (int j = 0; j < pathB.size(); j++)
|
for (int j = 0; j < pathB.size(); j++)
|
||||||
{
|
{
|
||||||
Segment b = (Segment) pathB.elementAt(j);
|
Segment b = pathB.elementAt(j);
|
||||||
nNodes += createNodes(a, b);
|
createNodes(a, b);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector paths = new Vector();
|
Vector<Segment> paths = new Vector<Segment>();
|
||||||
Segment v;
|
Segment v;
|
||||||
|
|
||||||
// we have intersecting points.
|
// we have intersecting points.
|
||||||
Vector segments = new Vector();
|
Vector<Segment> segments = new Vector<Segment>();
|
||||||
|
|
||||||
// In a union operation, we keep all
|
// In a union operation, we keep all
|
||||||
// segments of A oustide B and all B outside A
|
// segments of A oustide B and all B outside A
|
||||||
for (int i = 0; i < pathA.size(); i++)
|
for (int i = 0; i < pathA.size(); i++)
|
||||||
{
|
{
|
||||||
v = (Segment) pathA.elementAt(i);
|
v = pathA.elementAt(i);
|
||||||
Segment path = v;
|
Segment path = v;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
@ -250,7 +247,7 @@ public class Area implements Shape, Cloneable
|
||||||
|
|
||||||
for (int i = 0; i < pathB.size(); i++)
|
for (int i = 0; i < pathB.size(); i++)
|
||||||
{
|
{
|
||||||
v = (Segment) pathB.elementAt(i);
|
v = pathB.elementAt(i);
|
||||||
Segment path = v;
|
Segment path = v;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
@ -281,7 +278,7 @@ public class Area implements Shape, Cloneable
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector pathA = new Vector();
|
Vector<Segment> pathA = new Vector<Segment>();
|
||||||
Area B = (Area) area.clone();
|
Area B = (Area) area.clone();
|
||||||
pathA.addAll(solids);
|
pathA.addAll(solids);
|
||||||
pathA.addAll(holes);
|
pathA.addAll(holes);
|
||||||
|
@ -290,27 +287,23 @@ public class Area implements Shape, Cloneable
|
||||||
setDirection(B.holes, true);
|
setDirection(B.holes, true);
|
||||||
setDirection(B.solids, false);
|
setDirection(B.solids, false);
|
||||||
|
|
||||||
Vector pathB = new Vector();
|
Vector<Segment> pathB = new Vector<Segment>();
|
||||||
pathB.addAll(B.solids);
|
pathB.addAll(B.solids);
|
||||||
pathB.addAll(B.holes);
|
pathB.addAll(B.holes);
|
||||||
|
|
||||||
int nNodes = 0;
|
|
||||||
|
|
||||||
// create nodes
|
// create nodes
|
||||||
for (int i = 0; i < pathA.size(); i++)
|
for (int i = 0; i < pathA.size(); i++)
|
||||||
{
|
{
|
||||||
Segment a = (Segment) pathA.elementAt(i);
|
Segment a = pathA.elementAt(i);
|
||||||
for (int j = 0; j < pathB.size(); j++)
|
for (int j = 0; j < pathB.size(); j++)
|
||||||
{
|
{
|
||||||
Segment b = (Segment) pathB.elementAt(j);
|
Segment b = pathB.elementAt(j);
|
||||||
nNodes += createNodes(a, b);
|
createNodes(a, b);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector paths = new Vector();
|
|
||||||
|
|
||||||
// we have intersecting points.
|
// we have intersecting points.
|
||||||
Vector segments = new Vector();
|
Vector<Segment> segments = new Vector<Segment>();
|
||||||
|
|
||||||
// In a subtraction operation, we keep all
|
// In a subtraction operation, we keep all
|
||||||
// segments of A oustide B and all B within A
|
// segments of A oustide B and all B within A
|
||||||
|
@ -318,7 +311,7 @@ public class Area implements Shape, Cloneable
|
||||||
// and the segments before and after any node
|
// and the segments before and after any node
|
||||||
for (int i = 0; i < pathA.size(); i++)
|
for (int i = 0; i < pathA.size(); i++)
|
||||||
{
|
{
|
||||||
Segment v = (Segment) pathA.elementAt(i);
|
Segment v = pathA.elementAt(i);
|
||||||
Segment path = v;
|
Segment path = v;
|
||||||
if (v.isSegmentOutside(area) && v.node == null)
|
if (v.isSegmentOutside(area) && v.node == null)
|
||||||
segments.add(v);
|
segments.add(v);
|
||||||
|
@ -357,7 +350,7 @@ public class Area implements Shape, Cloneable
|
||||||
while (v != path);
|
while (v != path);
|
||||||
}
|
}
|
||||||
|
|
||||||
paths = weilerAtherton(segments);
|
Vector<Segment> paths = weilerAtherton(segments);
|
||||||
deleteRedundantPaths(paths);
|
deleteRedundantPaths(paths);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -376,32 +369,28 @@ public class Area implements Shape, Cloneable
|
||||||
if (equals(area))
|
if (equals(area))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Vector pathA = new Vector();
|
Vector<Segment> pathA = new Vector<Segment>();
|
||||||
Area B = (Area) area.clone();
|
Area B = (Area) area.clone();
|
||||||
pathA.addAll(solids);
|
pathA.addAll(solids);
|
||||||
pathA.addAll(holes);
|
pathA.addAll(holes);
|
||||||
|
|
||||||
Vector pathB = new Vector();
|
Vector<Segment> pathB = new Vector<Segment>();
|
||||||
pathB.addAll(B.solids);
|
pathB.addAll(B.solids);
|
||||||
pathB.addAll(B.holes);
|
pathB.addAll(B.holes);
|
||||||
|
|
||||||
int nNodes = 0;
|
|
||||||
|
|
||||||
// create nodes
|
// create nodes
|
||||||
for (int i = 0; i < pathA.size(); i++)
|
for (int i = 0; i < pathA.size(); i++)
|
||||||
{
|
{
|
||||||
Segment a = (Segment) pathA.elementAt(i);
|
Segment a = pathA.elementAt(i);
|
||||||
for (int j = 0; j < pathB.size(); j++)
|
for (int j = 0; j < pathB.size(); j++)
|
||||||
{
|
{
|
||||||
Segment b = (Segment) pathB.elementAt(j);
|
Segment b = pathB.elementAt(j);
|
||||||
nNodes += createNodes(a, b);
|
createNodes(a, b);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector paths = new Vector();
|
|
||||||
|
|
||||||
// we have intersecting points.
|
// we have intersecting points.
|
||||||
Vector segments = new Vector();
|
Vector<Segment> segments = new Vector<Segment>();
|
||||||
|
|
||||||
// In an intersection operation, we keep all
|
// In an intersection operation, we keep all
|
||||||
// segments of A within B and all B within A
|
// segments of A within B and all B within A
|
||||||
|
@ -410,7 +399,7 @@ public class Area implements Shape, Cloneable
|
||||||
// and the segments before and after any node
|
// and the segments before and after any node
|
||||||
for (int i = 0; i < pathA.size(); i++)
|
for (int i = 0; i < pathA.size(); i++)
|
||||||
{
|
{
|
||||||
Segment v = (Segment) pathA.elementAt(i);
|
Segment v = pathA.elementAt(i);
|
||||||
Segment path = v;
|
Segment path = v;
|
||||||
if (! v.isSegmentOutside(area) && v.node == null)
|
if (! v.isSegmentOutside(area) && v.node == null)
|
||||||
segments.add(v);
|
segments.add(v);
|
||||||
|
@ -430,7 +419,7 @@ public class Area implements Shape, Cloneable
|
||||||
|
|
||||||
for (int i = 0; i < pathB.size(); i++)
|
for (int i = 0; i < pathB.size(); i++)
|
||||||
{
|
{
|
||||||
Segment v = (Segment) pathB.elementAt(i);
|
Segment v = pathB.elementAt(i);
|
||||||
Segment path = v;
|
Segment path = v;
|
||||||
if (! v.isSegmentOutside(this) && v.node == null)
|
if (! v.isSegmentOutside(this) && v.node == null)
|
||||||
segments.add(v);
|
segments.add(v);
|
||||||
|
@ -449,7 +438,7 @@ public class Area implements Shape, Cloneable
|
||||||
while (v != path);
|
while (v != path);
|
||||||
}
|
}
|
||||||
|
|
||||||
paths = weilerAtherton(segments);
|
Vector<Segment> paths = weilerAtherton(segments);
|
||||||
deleteRedundantPaths(paths);
|
deleteRedundantPaths(paths);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -476,10 +465,10 @@ public class Area implements Shape, Cloneable
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector pathA = new Vector();
|
Vector<Segment> pathA = new Vector<Segment>();
|
||||||
|
|
||||||
Area B = (Area) area.clone();
|
Area B = (Area) area.clone();
|
||||||
Vector pathB = new Vector();
|
Vector<Segment> pathB = new Vector<Segment>();
|
||||||
pathA.addAll(solids);
|
pathA.addAll(solids);
|
||||||
pathA.addAll(holes);
|
pathA.addAll(holes);
|
||||||
|
|
||||||
|
@ -489,28 +478,25 @@ public class Area implements Shape, Cloneable
|
||||||
pathB.addAll(B.solids);
|
pathB.addAll(B.solids);
|
||||||
pathB.addAll(B.holes);
|
pathB.addAll(B.holes);
|
||||||
|
|
||||||
int nNodes = 0;
|
|
||||||
|
|
||||||
for (int i = 0; i < pathA.size(); i++)
|
for (int i = 0; i < pathA.size(); i++)
|
||||||
{
|
{
|
||||||
Segment a = (Segment) pathA.elementAt(i);
|
Segment a = pathA.elementAt(i);
|
||||||
for (int j = 0; j < pathB.size(); j++)
|
for (int j = 0; j < pathB.size(); j++)
|
||||||
{
|
{
|
||||||
Segment b = (Segment) pathB.elementAt(j);
|
Segment b = pathB.elementAt(j);
|
||||||
nNodes += createNodes(a, b);
|
createNodes(a, b);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector paths = new Vector();
|
|
||||||
Segment v;
|
Segment v;
|
||||||
|
|
||||||
// we have intersecting points.
|
// we have intersecting points.
|
||||||
Vector segments = new Vector();
|
Vector<Segment> segments = new Vector<Segment>();
|
||||||
|
|
||||||
// In an XOR operation, we operate on all segments
|
// In an XOR operation, we operate on all segments
|
||||||
for (int i = 0; i < pathA.size(); i++)
|
for (int i = 0; i < pathA.size(); i++)
|
||||||
{
|
{
|
||||||
v = (Segment) pathA.elementAt(i);
|
v = pathA.elementAt(i);
|
||||||
Segment path = v;
|
Segment path = v;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
@ -522,7 +508,7 @@ public class Area implements Shape, Cloneable
|
||||||
|
|
||||||
for (int i = 0; i < pathB.size(); i++)
|
for (int i = 0; i < pathB.size(); i++)
|
||||||
{
|
{
|
||||||
v = (Segment) pathB.elementAt(i);
|
v = pathB.elementAt(i);
|
||||||
Segment path = v;
|
Segment path = v;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
@ -532,7 +518,7 @@ public class Area implements Shape, Cloneable
|
||||||
while (v != path);
|
while (v != path);
|
||||||
}
|
}
|
||||||
|
|
||||||
paths = weilerAtherton(segments);
|
Vector<Segment> paths = weilerAtherton(segments);
|
||||||
deleteRedundantPaths(paths);
|
deleteRedundantPaths(paths);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -541,8 +527,8 @@ public class Area implements Shape, Cloneable
|
||||||
*/
|
*/
|
||||||
public void reset()
|
public void reset()
|
||||||
{
|
{
|
||||||
solids = new Vector();
|
solids = new Vector<Segment>();
|
||||||
holes = new Vector();
|
holes = new Vector<Segment>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -556,9 +542,9 @@ public class Area implements Shape, Cloneable
|
||||||
|
|
||||||
double totalArea = 0;
|
double totalArea = 0;
|
||||||
for (int i = 0; i < solids.size(); i++)
|
for (int i = 0; i < solids.size(); i++)
|
||||||
totalArea += Math.abs(((Segment) solids.elementAt(i)).getSignedArea());
|
totalArea += Math.abs(solids.elementAt(i).getSignedArea());
|
||||||
for (int i = 0; i < holes.size(); i++)
|
for (int i = 0; i < holes.size(); i++)
|
||||||
totalArea -= Math.abs(((Segment) holes.elementAt(i)).getSignedArea());
|
totalArea -= Math.abs(holes.elementAt(i).getSignedArea());
|
||||||
if (totalArea <= EPSILON)
|
if (totalArea <= EPSILON)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
@ -572,10 +558,10 @@ public class Area implements Shape, Cloneable
|
||||||
public boolean isPolygonal()
|
public boolean isPolygonal()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < holes.size(); i++)
|
for (int i = 0; i < holes.size(); i++)
|
||||||
if (! ((Segment) holes.elementAt(i)).isPolygonal())
|
if (!holes.elementAt(i).isPolygonal())
|
||||||
return false;
|
return false;
|
||||||
for (int i = 0; i < solids.size(); i++)
|
for (int i = 0; i < solids.size(); i++)
|
||||||
if (! ((Segment) solids.elementAt(i)).isPolygonal())
|
if (!solids.elementAt(i).isPolygonal())
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -599,7 +585,7 @@ public class Area implements Shape, Cloneable
|
||||||
if (holes.size() != 0 || solids.size() != 1)
|
if (holes.size() != 0 || solids.size() != 1)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
Segment path = (Segment) solids.elementAt(0);
|
Segment path = solids.elementAt(0);
|
||||||
if (! path.isPolygonal())
|
if (! path.isPolygonal())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -657,12 +643,12 @@ public class Area implements Shape, Cloneable
|
||||||
double xmax;
|
double xmax;
|
||||||
double ymin;
|
double ymin;
|
||||||
double ymax;
|
double ymax;
|
||||||
xmin = xmax = ((Segment) solids.elementAt(0)).P1.getX();
|
xmin = xmax = solids.elementAt(0).P1.getX();
|
||||||
ymin = ymax = ((Segment) solids.elementAt(0)).P1.getY();
|
ymin = ymax = solids.elementAt(0).P1.getY();
|
||||||
|
|
||||||
for (int path = 0; path < solids.size(); path++)
|
for (int path = 0; path < solids.size(); path++)
|
||||||
{
|
{
|
||||||
Rectangle2D r = ((Segment) solids.elementAt(path)).getPathBounds();
|
Rectangle2D r = solids.elementAt(path).getPathBounds();
|
||||||
xmin = Math.min(r.getMinX(), xmin);
|
xmin = Math.min(r.getMinX(), xmin);
|
||||||
ymin = Math.min(r.getMinY(), ymin);
|
ymin = Math.min(r.getMinY(), ymin);
|
||||||
xmax = Math.max(r.getMaxX(), xmax);
|
xmax = Math.max(r.getMaxX(), xmax);
|
||||||
|
@ -696,9 +682,9 @@ public class Area implements Shape, Cloneable
|
||||||
{
|
{
|
||||||
Area clone = new Area();
|
Area clone = new Area();
|
||||||
for (int i = 0; i < solids.size(); i++)
|
for (int i = 0; i < solids.size(); i++)
|
||||||
clone.solids.add(((Segment) solids.elementAt(i)).cloneSegmentList());
|
clone.solids.add(solids.elementAt(i).cloneSegmentList());
|
||||||
for (int i = 0; i < holes.size(); i++)
|
for (int i = 0; i < holes.size(); i++)
|
||||||
clone.holes.add(((Segment) holes.elementAt(i)).cloneSegmentList());
|
clone.holes.add(holes.elementAt(i).cloneSegmentList());
|
||||||
return clone;
|
return clone;
|
||||||
}
|
}
|
||||||
catch (CloneNotSupportedException e)
|
catch (CloneNotSupportedException e)
|
||||||
|
@ -727,10 +713,10 @@ public class Area implements Shape, Cloneable
|
||||||
|| holes.size() != area.holes.size())
|
|| holes.size() != area.holes.size())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
Vector pathA = new Vector();
|
Vector<Segment> pathA = new Vector<Segment>();
|
||||||
pathA.addAll(solids);
|
pathA.addAll(solids);
|
||||||
pathA.addAll(holes);
|
pathA.addAll(holes);
|
||||||
Vector pathB = new Vector();
|
Vector<Segment> pathB = new Vector<Segment>();
|
||||||
pathB.addAll(area.solids);
|
pathB.addAll(area.solids);
|
||||||
pathB.addAll(area.holes);
|
pathB.addAll(area.holes);
|
||||||
|
|
||||||
|
@ -741,8 +727,8 @@ public class Area implements Shape, Cloneable
|
||||||
{
|
{
|
||||||
for (int j = 0; j < nPaths; j++)
|
for (int j = 0; j < nPaths; j++)
|
||||||
{
|
{
|
||||||
Segment p1 = (Segment) pathA.elementAt(i);
|
Segment p1 = pathA.elementAt(i);
|
||||||
Segment p2 = (Segment) pathB.elementAt(j);
|
Segment p2 = pathB.elementAt(j);
|
||||||
if (! match[0][i] && ! match[1][j])
|
if (! match[0][i] && ! match[1][j])
|
||||||
if (p1.pathEquals(p2))
|
if (p1.pathEquals(p2))
|
||||||
match[0][i] = match[1][j] = true;
|
match[0][i] = match[1][j] = true;
|
||||||
|
@ -763,9 +749,9 @@ public class Area implements Shape, Cloneable
|
||||||
public void transform(AffineTransform at)
|
public void transform(AffineTransform at)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < solids.size(); i++)
|
for (int i = 0; i < solids.size(); i++)
|
||||||
((Segment) solids.elementAt(i)).transformSegmentList(at);
|
solids.elementAt(i).transformSegmentList(at);
|
||||||
for (int i = 0; i < holes.size(); i++)
|
for (int i = 0; i < holes.size(); i++)
|
||||||
((Segment) holes.elementAt(i)).transformSegmentList(at);
|
holes.elementAt(i).transformSegmentList(at);
|
||||||
|
|
||||||
// Note that the orientation is not invariant under inversion
|
// Note that the orientation is not invariant under inversion
|
||||||
if ((at.getType() & AffineTransform.TYPE_FLIP) != 0)
|
if ((at.getType() & AffineTransform.TYPE_FLIP) != 0)
|
||||||
|
@ -800,11 +786,11 @@ public class Area implements Shape, Cloneable
|
||||||
{
|
{
|
||||||
int n = 0;
|
int n = 0;
|
||||||
for (int i = 0; i < solids.size(); i++)
|
for (int i = 0; i < solids.size(); i++)
|
||||||
if (((Segment) solids.elementAt(i)).contains(x, y))
|
if (solids.elementAt(i).contains(x, y))
|
||||||
n++;
|
n++;
|
||||||
|
|
||||||
for (int i = 0; i < holes.size(); i++)
|
for (int i = 0; i < holes.size(); i++)
|
||||||
if (((Segment) holes.elementAt(i)).contains(x, y))
|
if (holes.elementAt(i).contains(x, y))
|
||||||
n--;
|
n--;
|
||||||
|
|
||||||
return (n != 0);
|
return (n != 0);
|
||||||
|
@ -854,7 +840,7 @@ public class Area implements Shape, Cloneable
|
||||||
{
|
{
|
||||||
Segment v;
|
Segment v;
|
||||||
Segment start;
|
Segment start;
|
||||||
start = v = (Segment) solids.elementAt(path);
|
start = v = solids.elementAt(path);
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (l[i].hasIntersections(v))
|
if (l[i].hasIntersections(v))
|
||||||
|
@ -867,7 +853,7 @@ public class Area implements Shape, Cloneable
|
||||||
{
|
{
|
||||||
Segment v;
|
Segment v;
|
||||||
Segment start;
|
Segment start;
|
||||||
start = v = (Segment) holes.elementAt(path);
|
start = v = holes.elementAt(path);
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (l[i].hasIntersections(v))
|
if (l[i].hasIntersections(v))
|
||||||
|
@ -886,7 +872,7 @@ public class Area implements Shape, Cloneable
|
||||||
// but encloses a hole?
|
// but encloses a hole?
|
||||||
Rectangle2D r = new Rectangle2D.Double(x, y, w, h);
|
Rectangle2D r = new Rectangle2D.Double(x, y, w, h);
|
||||||
for (int path = 0; path < holes.size(); path++)
|
for (int path = 0; path < holes.size(); path++)
|
||||||
if (! ((Segment) holes.elementAt(path)).isSegmentOutside(r))
|
if (! holes.elementAt(path).isSegmentOutside(r))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -938,7 +924,7 @@ public class Area implements Shape, Cloneable
|
||||||
{
|
{
|
||||||
Segment v;
|
Segment v;
|
||||||
Segment start;
|
Segment start;
|
||||||
start = v = (Segment) solids.elementAt(path);
|
start = v = solids.elementAt(path);
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (l[i].hasIntersections(v))
|
if (l[i].hasIntersections(v))
|
||||||
|
@ -951,7 +937,7 @@ public class Area implements Shape, Cloneable
|
||||||
{
|
{
|
||||||
Segment v;
|
Segment v;
|
||||||
Segment start;
|
Segment start;
|
||||||
start = v = (Segment) holes.elementAt(path);
|
start = v = holes.elementAt(path);
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (l[i].hasIntersections(v))
|
if (l[i].hasIntersections(v))
|
||||||
|
@ -967,7 +953,7 @@ public class Area implements Shape, Cloneable
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// What if the rectangle encloses the whole shape?
|
// What if the rectangle encloses the whole shape?
|
||||||
Point2D p = ((Segment) solids.elementAt(0)).getMidPoint();
|
Point2D p = solids.elementAt(0).getMidPoint();
|
||||||
if ((new Rectangle2D.Double(x, y, w, h)).contains(p))
|
if ((new Rectangle2D.Double(x, y, w, h)).contains(p))
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
|
@ -1020,7 +1006,7 @@ public class Area implements Shape, Cloneable
|
||||||
*/
|
*/
|
||||||
private class AreaIterator implements PathIterator
|
private class AreaIterator implements PathIterator
|
||||||
{
|
{
|
||||||
private Vector segments;
|
private Vector<IteratorSegment> segments;
|
||||||
private int index;
|
private int index;
|
||||||
private AffineTransform at;
|
private AffineTransform at;
|
||||||
|
|
||||||
|
@ -1045,14 +1031,14 @@ public class Area implements Shape, Cloneable
|
||||||
{
|
{
|
||||||
this.at = at;
|
this.at = at;
|
||||||
index = 0;
|
index = 0;
|
||||||
segments = new Vector();
|
segments = new Vector<IteratorSegment>();
|
||||||
Vector allpaths = new Vector();
|
Vector<Segment> allpaths = new Vector<Segment>();
|
||||||
allpaths.addAll(solids);
|
allpaths.addAll(solids);
|
||||||
allpaths.addAll(holes);
|
allpaths.addAll(holes);
|
||||||
|
|
||||||
for (int i = 0; i < allpaths.size(); i++)
|
for (int i = 0; i < allpaths.size(); i++)
|
||||||
{
|
{
|
||||||
Segment v = (Segment) allpaths.elementAt(i);
|
Segment v = allpaths.elementAt(i);
|
||||||
Segment start = v;
|
Segment start = v;
|
||||||
|
|
||||||
IteratorSegment is = new IteratorSegment();
|
IteratorSegment is = new IteratorSegment();
|
||||||
|
@ -1078,7 +1064,7 @@ public class Area implements Shape, Cloneable
|
||||||
|
|
||||||
public int currentSegment(double[] coords)
|
public int currentSegment(double[] coords)
|
||||||
{
|
{
|
||||||
IteratorSegment s = (IteratorSegment) segments.elementAt(index);
|
IteratorSegment s = segments.elementAt(index);
|
||||||
if (at != null)
|
if (at != null)
|
||||||
at.transform(s.coords, 0, coords, 0, 3);
|
at.transform(s.coords, 0, coords, 0, 3);
|
||||||
else
|
else
|
||||||
|
@ -1089,7 +1075,7 @@ public class Area implements Shape, Cloneable
|
||||||
|
|
||||||
public int currentSegment(float[] coords)
|
public int currentSegment(float[] coords)
|
||||||
{
|
{
|
||||||
IteratorSegment s = (IteratorSegment) segments.elementAt(index);
|
IteratorSegment s = segments.elementAt(index);
|
||||||
double[] d = new double[6];
|
double[] d = new double[6];
|
||||||
if (at != null)
|
if (at != null)
|
||||||
{
|
{
|
||||||
|
@ -1129,13 +1115,13 @@ public class Area implements Shape, Cloneable
|
||||||
*
|
*
|
||||||
* Returns a Vector of the resulting paths.
|
* Returns a Vector of the resulting paths.
|
||||||
*/
|
*/
|
||||||
private Vector weilerAtherton(Vector segments)
|
private Vector<Segment> weilerAtherton(Vector<Segment> segments)
|
||||||
{
|
{
|
||||||
Vector paths = new Vector();
|
Vector<Segment> paths = new Vector<Segment>();
|
||||||
while (segments.size() > 0)
|
while (segments.size() > 0)
|
||||||
{
|
{
|
||||||
// Iterate over the path
|
// Iterate over the path
|
||||||
Segment start = (Segment) segments.elementAt(0);
|
Segment start = segments.elementAt(0);
|
||||||
Segment s = start;
|
Segment s = start;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
@ -1252,7 +1238,7 @@ public class Area implements Shape, Cloneable
|
||||||
double[] temp = new double[2];
|
double[] temp = new double[2];
|
||||||
temp[0] = t1 + s * w1;
|
temp[0] = t1 + s * w1;
|
||||||
temp[1] = t2 + t * w1;
|
temp[1] = t2 + t * w1;
|
||||||
cc_intersections.add(temp);
|
ccIntersections.add(temp);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1328,28 +1314,28 @@ public class Area implements Shape, Cloneable
|
||||||
if (! r1.intersects(r2))
|
if (! r1.intersects(r2))
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
cc_intersections = new Vector();
|
ccIntersections = new Vector<double[]>();
|
||||||
recursiveSubdivide(curve1.getCubicCurve2D(), curve2.getCubicCurve2D(),
|
recursiveSubdivide(curve1.getCubicCurve2D(), curve2.getCubicCurve2D(),
|
||||||
getRecursionDepth(curve1), getRecursionDepth(curve2),
|
getRecursionDepth(curve1), getRecursionDepth(curve2),
|
||||||
0.0, 0.0, 1.0, 1.0);
|
0.0, 0.0, 1.0, 1.0);
|
||||||
|
|
||||||
if (cc_intersections.size() == 0)
|
if (ccIntersections.size() == 0)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
Intersection[] results = new Intersection[cc_intersections.size()];
|
Intersection[] results = new Intersection[ccIntersections.size()];
|
||||||
for (int i = 0; i < cc_intersections.size(); i++)
|
for (int i = 0; i < ccIntersections.size(); i++)
|
||||||
{
|
{
|
||||||
double[] temp = (double[]) cc_intersections.elementAt(i);
|
double[] temp = ccIntersections.elementAt(i);
|
||||||
results[i] = new Intersection(curve1.evaluatePoint(temp[0]), temp[0],
|
results[i] = new Intersection(curve1.evaluatePoint(temp[0]), temp[0],
|
||||||
temp[1]);
|
temp[1]);
|
||||||
}
|
}
|
||||||
cc_intersections = null;
|
ccIntersections = null;
|
||||||
return (results);
|
return (results);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the intersections between a line and a quadratic bezier
|
* Returns the intersections between a line and a quadratic bezier
|
||||||
* Or null if no intersections are found1
|
* Or null if no intersections are found.
|
||||||
* This is done through combining the line's equation with the
|
* This is done through combining the line's equation with the
|
||||||
* parametric form of the Bezier and solving the resulting quadratic.
|
* parametric form of the Bezier and solving the resulting quadratic.
|
||||||
* This is package-private to avoid an accessor method.
|
* This is package-private to avoid an accessor method.
|
||||||
|
@ -1622,9 +1608,9 @@ public class Area implements Shape, Cloneable
|
||||||
* Helper method
|
* Helper method
|
||||||
* Turns a shape into a Vector of Segments
|
* Turns a shape into a Vector of Segments
|
||||||
*/
|
*/
|
||||||
private Vector makeSegment(Shape s)
|
private Vector<Segment> makeSegment(Shape s)
|
||||||
{
|
{
|
||||||
Vector paths = new Vector();
|
Vector<Segment> paths = new Vector<Segment>();
|
||||||
PathIterator pi = s.getPathIterator(null);
|
PathIterator pi = s.getPathIterator(null);
|
||||||
double[] coords = new double[6];
|
double[] coords = new double[6];
|
||||||
Segment subpath = null;
|
Segment subpath = null;
|
||||||
|
@ -1786,7 +1772,7 @@ public class Area implements Shape, Cloneable
|
||||||
}
|
}
|
||||||
while (a != A); // until one wrap.
|
while (a != A); // until one wrap.
|
||||||
|
|
||||||
return (nNodes);
|
return nNodes;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1824,7 +1810,7 @@ public class Area implements Shape, Cloneable
|
||||||
* solid areas) Clears any nodes. Sorts the remaining paths into solids
|
* solid areas) Clears any nodes. Sorts the remaining paths into solids
|
||||||
* and holes, sets their orientation and sets the solids and holes lists.
|
* and holes, sets their orientation and sets the solids and holes lists.
|
||||||
*/
|
*/
|
||||||
private void deleteRedundantPaths(Vector paths)
|
private void deleteRedundantPaths(Vector<Segment> paths)
|
||||||
{
|
{
|
||||||
int npaths = paths.size();
|
int npaths = paths.size();
|
||||||
|
|
||||||
|
@ -1836,19 +1822,19 @@ public class Area implements Shape, Cloneable
|
||||||
neg = ((windingRule == PathIterator.WIND_NON_ZERO) ? -1 : 1);
|
neg = ((windingRule == PathIterator.WIND_NON_ZERO) ? -1 : 1);
|
||||||
|
|
||||||
for (int i = 0; i < npaths; i++)
|
for (int i = 0; i < npaths; i++)
|
||||||
bb[i] = ((Segment) paths.elementAt(i)).getPathBounds();
|
bb[i] = paths.elementAt(i).getPathBounds();
|
||||||
|
|
||||||
// Find which path contains which, assign winding numbers
|
// Find which path contains which, assign winding numbers
|
||||||
for (int i = 0; i < npaths; i++)
|
for (int i = 0; i < npaths; i++)
|
||||||
{
|
{
|
||||||
Segment pathA = (Segment) paths.elementAt(i);
|
Segment pathA = paths.elementAt(i);
|
||||||
pathA.nullNodes(); // remove any now-redundant nodes, in case.
|
pathA.nullNodes(); // remove any now-redundant nodes, in case.
|
||||||
int windingA = pathA.hasClockwiseOrientation() ? 1 : neg;
|
int windingA = pathA.hasClockwiseOrientation() ? 1 : neg;
|
||||||
|
|
||||||
for (int j = 0; j < npaths; j++)
|
for (int j = 0; j < npaths; j++)
|
||||||
if (i != j)
|
if (i != j)
|
||||||
{
|
{
|
||||||
Segment pathB = (Segment) paths.elementAt(j);
|
Segment pathB = paths.elementAt(j);
|
||||||
|
|
||||||
// A contains B
|
// A contains B
|
||||||
if (bb[i].intersects(bb[j]))
|
if (bb[i].intersects(bb[j]))
|
||||||
|
@ -1876,8 +1862,8 @@ public class Area implements Shape, Cloneable
|
||||||
windingNumbers[i][1] = contains[i][i];
|
windingNumbers[i][1] = contains[i][i];
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector solids = new Vector();
|
Vector<Segment> solids = new Vector<Segment>();
|
||||||
Vector holes = new Vector();
|
Vector<Segment> holes = new Vector<Segment>();
|
||||||
|
|
||||||
if (windingRule == PathIterator.WIND_NON_ZERO)
|
if (windingRule == PathIterator.WIND_NON_ZERO)
|
||||||
{
|
{
|
||||||
|
@ -1913,12 +1899,12 @@ public class Area implements Shape, Cloneable
|
||||||
* @param clockwise gives the direction,
|
* @param clockwise gives the direction,
|
||||||
* true = clockwise, false = counter-clockwise
|
* true = clockwise, false = counter-clockwise
|
||||||
*/
|
*/
|
||||||
private void setDirection(Vector paths, boolean clockwise)
|
private void setDirection(Vector<Segment> paths, boolean clockwise)
|
||||||
{
|
{
|
||||||
Segment v;
|
Segment v;
|
||||||
for (int i = 0; i < paths.size(); i++)
|
for (int i = 0; i < paths.size(); i++)
|
||||||
{
|
{
|
||||||
v = (Segment) paths.elementAt(i);
|
v = paths.elementAt(i);
|
||||||
if (clockwise != v.hasClockwiseOrientation())
|
if (clockwise != v.hasClockwiseOrientation())
|
||||||
v.reverseAll();
|
v.reverseAll();
|
||||||
}
|
}
|
||||||
|
@ -2157,7 +2143,7 @@ public class Area implements Shape, Cloneable
|
||||||
*/
|
*/
|
||||||
Segment cloneSegmentList() throws CloneNotSupportedException
|
Segment cloneSegmentList() throws CloneNotSupportedException
|
||||||
{
|
{
|
||||||
Vector list = new Vector();
|
Vector<Segment> list = new Vector<Segment>();
|
||||||
Segment v = next;
|
Segment v = next;
|
||||||
|
|
||||||
while (v != this)
|
while (v != this)
|
||||||
|
@ -2170,7 +2156,7 @@ public class Area implements Shape, Cloneable
|
||||||
v = clone;
|
v = clone;
|
||||||
for (int i = 0; i < list.size(); i++)
|
for (int i = 0; i < list.size(); i++)
|
||||||
{
|
{
|
||||||
clone.next = (Segment) ((Segment) list.elementAt(i)).clone();
|
clone.next = (Segment) list.elementAt(i).clone();
|
||||||
clone = clone.next;
|
clone = clone.next;
|
||||||
}
|
}
|
||||||
clone.next = v;
|
clone.next = v;
|
||||||
|
@ -2209,7 +2195,7 @@ public class Area implements Shape, Cloneable
|
||||||
*/
|
*/
|
||||||
protected int createNodes(Segment b, Intersection[] x)
|
protected int createNodes(Segment b, Intersection[] x)
|
||||||
{
|
{
|
||||||
Vector v = new Vector();
|
Vector<Intersection> v = new Vector<Intersection>();
|
||||||
for (int i = 0; i < x.length; i++)
|
for (int i = 0; i < x.length; i++)
|
||||||
{
|
{
|
||||||
Point2D p = x[i].p;
|
Point2D p = x[i].p;
|
||||||
|
@ -2222,7 +2208,7 @@ public class Area implements Shape, Cloneable
|
||||||
Intersection[] A = new Intersection[nNodes];
|
Intersection[] A = new Intersection[nNodes];
|
||||||
Intersection[] B = new Intersection[nNodes];
|
Intersection[] B = new Intersection[nNodes];
|
||||||
for (int i = 0; i < nNodes; i++)
|
for (int i = 0; i < nNodes; i++)
|
||||||
A[i] = B[i] = (Intersection) v.elementAt(i);
|
A[i] = B[i] = v.elementAt(i);
|
||||||
|
|
||||||
// Create two lists sorted by the parameter
|
// Create two lists sorted by the parameter
|
||||||
// Bubble sort, OK I suppose, since the number of intersections
|
// Bubble sort, OK I suppose, since the number of intersections
|
||||||
|
|
|
@ -104,6 +104,7 @@ import java.util.NoSuchElementException;
|
||||||
* @status updated to 1.5
|
* @status updated to 1.5
|
||||||
*/
|
*/
|
||||||
public class XMLDecoder
|
public class XMLDecoder
|
||||||
|
implements AutoCloseable
|
||||||
{
|
{
|
||||||
private Object owner;
|
private Object owner;
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,9 @@ import java.io.OutputStream;
|
||||||
* @author Robert Schuster (robertschuster@fsfe.org)
|
* @author Robert Schuster (robertschuster@fsfe.org)
|
||||||
* @since 1.4
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
public class XMLEncoder extends Encoder
|
public class XMLEncoder
|
||||||
|
extends Encoder
|
||||||
|
implements AutoCloseable
|
||||||
{
|
{
|
||||||
Object owner;
|
Object owner;
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,7 @@ package java.io;
|
||||||
* @since 1.5
|
* @since 1.5
|
||||||
*/
|
*/
|
||||||
public interface Closeable
|
public interface Closeable
|
||||||
|
extends AutoCloseable
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -48,7 +48,8 @@ package java.io;
|
||||||
*
|
*
|
||||||
* @see DataInput
|
* @see DataInput
|
||||||
*/
|
*/
|
||||||
public interface ObjectInput extends DataInput
|
public interface ObjectInput
|
||||||
|
extends DataInput, AutoCloseable
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* This method returns the number of bytes that can be read without
|
* This method returns the number of bytes that can be read without
|
||||||
|
|
|
@ -529,12 +529,13 @@ public class ObjectInputStream extends InputStream
|
||||||
if (dump)
|
if (dump)
|
||||||
dumpElementln("ENUM=");
|
dumpElementln("ENUM=");
|
||||||
ObjectStreamClass osc = (ObjectStreamClass) readObject();
|
ObjectStreamClass osc = (ObjectStreamClass) readObject();
|
||||||
|
int enumHandle = assignNewHandle(null, shared);
|
||||||
String constantName = (String) readObject();
|
String constantName = (String) readObject();
|
||||||
if (dump)
|
if (dump)
|
||||||
dumpElementln("CONSTANT NAME = " + constantName);
|
dumpElementln("CONSTANT NAME = " + constantName);
|
||||||
Class clazz = osc.forClass();
|
Class clazz = osc.forClass();
|
||||||
Enum instance = Enum.valueOf(clazz, constantName);
|
Enum instance = Enum.valueOf(clazz, constantName);
|
||||||
assignNewHandle(instance,shared);
|
rememberHandle(instance, shared, enumHandle);
|
||||||
ret_val = instance;
|
ret_val = instance;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,8 @@ package java.io;
|
||||||
*
|
*
|
||||||
* @see DataOutput
|
* @see DataOutput
|
||||||
*/
|
*/
|
||||||
public interface ObjectOutput extends DataOutput
|
public interface ObjectOutput
|
||||||
|
extends DataOutput, AutoCloseable
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* This method writes the specified byte to the output stream.
|
* This method writes the specified byte to the output stream.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* AssertionError.java -- indication of a failed assertion
|
/* AssertionError.java -- indication of a failed assertion
|
||||||
Copyright (C) 2002, 2005 Free Software Foundation, Inc.
|
Copyright (C) 2002, 2005, 2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
@ -145,4 +145,16 @@ public class AssertionError extends Error
|
||||||
{
|
{
|
||||||
super(Double.toString(msg));
|
super(Double.toString(msg));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Construct an AssertionError with detail message and cause.
|
||||||
|
*
|
||||||
|
* @param msg Detail message.
|
||||||
|
* @param cause The cause of this exception, may be null
|
||||||
|
* @since 1.7
|
||||||
|
*/
|
||||||
|
public AssertionError(String msg, Throwable cause)
|
||||||
|
{
|
||||||
|
super(msg, cause);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,50 @@
|
||||||
|
/* AutoCloseable.java -- Resource that must be closed after it is no longer
|
||||||
|
used.
|
||||||
|
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
GNU Classpath is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
GNU Classpath is distributed in the hope that it will be useful, but
|
||||||
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
|
02110-1301 USA.
|
||||||
|
|
||||||
|
Linking this library statically or dynamically with other modules is
|
||||||
|
making a combined work based on this library. Thus, the terms and
|
||||||
|
conditions of the GNU General Public License cover the whole
|
||||||
|
combination.
|
||||||
|
|
||||||
|
As a special exception, the copyright holders of this library give you
|
||||||
|
permission to link this library with independent modules to produce an
|
||||||
|
executable, regardless of the license terms of these independent
|
||||||
|
modules, and to copy and distribute the resulting executable under
|
||||||
|
terms of your choice, provided that you also meet, for each linked
|
||||||
|
independent module, the terms and conditions of the license of that
|
||||||
|
module. An independent module is a module which is not derived from
|
||||||
|
or based on this library. If you modify this library, you may extend
|
||||||
|
this exception to your version of the library, but you are not
|
||||||
|
obligated to do so. If you do not wish to do so, delete this
|
||||||
|
exception statement from your version. */
|
||||||
|
|
||||||
|
|
||||||
|
package java.lang;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resource that must be closed after it is no longer used.
|
||||||
|
*
|
||||||
|
* @since 1.7
|
||||||
|
*/
|
||||||
|
public interface AutoCloseable
|
||||||
|
{
|
||||||
|
void close() throws Exception;
|
||||||
|
}
|
|
@ -236,6 +236,21 @@ public final class Boolean implements Serializable, Comparable<Boolean>
|
||||||
return value == other.value ? 0 : (value ? 1 : -1);
|
return value == other.value ? 0 : (value ? 1 : -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compares two unboxed boolean values.
|
||||||
|
*
|
||||||
|
* @param x First value to compare.
|
||||||
|
* @param y Second value to compare.
|
||||||
|
* @return 0 if both Booleans represent the same value, a positive number
|
||||||
|
* if this Boolean represents true and the other false, and a negative
|
||||||
|
* number otherwise.
|
||||||
|
* @since 1.7
|
||||||
|
*/
|
||||||
|
public static int compare(boolean x, boolean y)
|
||||||
|
{
|
||||||
|
return Boolean.valueOf(x).compareTo(Boolean.valueOf(y));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If the String argument is "true", ignoring case, return true.
|
* If the String argument is "true", ignoring case, return true.
|
||||||
* Otherwise, return false.
|
* Otherwise, return false.
|
||||||
|
|
|
@ -370,4 +370,21 @@ public final class Byte extends Number implements Comparable<Byte>
|
||||||
return value - b.value;
|
return value - b.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compares two unboxed byte values.
|
||||||
|
* The result is positive if the first is greater, negative if the second
|
||||||
|
* is greater, and 0 if the two are equal.
|
||||||
|
*
|
||||||
|
* @param x First value to compare.
|
||||||
|
* @param y Second value to compare.
|
||||||
|
*
|
||||||
|
* @return positive int if the first value is greater, negative if the second
|
||||||
|
* is greater, and 0 if the two are equal.
|
||||||
|
* @since 1.7
|
||||||
|
*/
|
||||||
|
public static int compare(byte x, byte y)
|
||||||
|
{
|
||||||
|
return Byte.valueOf(x).compareTo(Byte.valueOf(y));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4199,6 +4199,23 @@ public final class Character implements Serializable, Comparable<Character>
|
||||||
return value - anotherCharacter.value;
|
return value - anotherCharacter.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compares two unboxed char values.
|
||||||
|
* The result is positive if the first is greater, negative if the second
|
||||||
|
* is greater, and 0 if the two are equal.
|
||||||
|
*
|
||||||
|
* @param x First value to compare.
|
||||||
|
* @param y Second value to compare.
|
||||||
|
*
|
||||||
|
* @return positive int if the first value is greater, negative if the second
|
||||||
|
* is greater, and 0 if the two are equal.
|
||||||
|
* @since 1.7
|
||||||
|
*/
|
||||||
|
public static int compare(char x, char y)
|
||||||
|
{
|
||||||
|
return Character.valueOf(x).compareTo(Character.valueOf(y));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an <code>Character</code> object wrapping the value.
|
* Returns an <code>Character</code> object wrapping the value.
|
||||||
* In contrast to the <code>Character</code> constructor, this method
|
* In contrast to the <code>Character</code> constructor, this method
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* ClassNotFoundException.java -- thrown when class definition cannot be found
|
/* ClassNotFoundException.java -- thrown when class definition cannot be found
|
||||||
Copyright (C) 1998, 2002, 2005 Free Software Foundation, Inc.
|
Copyright (C) 1998, 2002, 2005, 2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
@ -47,9 +47,9 @@ package java.lang;
|
||||||
* @see Class#forName(String)
|
* @see Class#forName(String)
|
||||||
* @see ClassLoader#findSystemClass(String)
|
* @see ClassLoader#findSystemClass(String)
|
||||||
* @see ClassLoader#loadClass(String, boolean)
|
* @see ClassLoader#loadClass(String, boolean)
|
||||||
* @status updated to 1.4
|
* @status updated to 1.7
|
||||||
*/
|
*/
|
||||||
public class ClassNotFoundException extends Exception
|
public class ClassNotFoundException extends ReflectiveOperationException
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Compatible with JDK 1.0+.
|
* Compatible with JDK 1.0+.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* IllegalAccessException.java -- thrown on attempt to reflect on
|
/* IllegalAccessException.java -- thrown on attempt to reflect on
|
||||||
inaccessible data
|
inaccessible data
|
||||||
Copyright (C) 1998, 1999, 2001, 2002, 2005 Free Software Foundation, Inc.
|
Copyright (C) 1998, 1999, 2001, 2002, 2005, 2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
@ -71,9 +71,9 @@ import java.lang.reflect.Method;
|
||||||
* @see Field#getDouble(Object)
|
* @see Field#getDouble(Object)
|
||||||
* @see Method#invoke(Object, Object[])
|
* @see Method#invoke(Object, Object[])
|
||||||
* @see Constructor#newInstance(Object[])
|
* @see Constructor#newInstance(Object[])
|
||||||
* @status updated to 1.4
|
* @status updated to 1.7
|
||||||
*/
|
*/
|
||||||
public class IllegalAccessException extends Exception
|
public class IllegalAccessException extends ReflectiveOperationException
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Compatible with JDK 1.0+.
|
* Compatible with JDK 1.0+.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* InstantiationException.java -- thrown when reflection cannot create an
|
/* InstantiationException.java -- thrown when reflection cannot create an
|
||||||
instance
|
instance
|
||||||
Copyright (C) 1998, 1999, 2001, 2002, 2005 Free Software Foundation, Inc.
|
Copyright (C) 1998, 1999, 2001, 2002, 2005, 2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
@ -46,9 +46,9 @@ package java.lang;
|
||||||
* @author Brian Jones
|
* @author Brian Jones
|
||||||
* @author Warren Levy (warrenl@cygnus.com)
|
* @author Warren Levy (warrenl@cygnus.com)
|
||||||
* @see Class#newInstance()
|
* @see Class#newInstance()
|
||||||
* @status updated to 1.4
|
* @status updated to 1.7
|
||||||
*/
|
*/
|
||||||
public class InstantiationException extends Exception
|
public class InstantiationException extends ReflectiveOperationException
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Compatible with JDK 1.0+.
|
* Compatible with JDK 1.0+.
|
||||||
|
|
|
@ -585,6 +585,23 @@ public final class Integer extends Number implements Comparable<Integer>
|
||||||
return value > i.value ? 1 : -1;
|
return value > i.value ? 1 : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compares two unboxed int values.
|
||||||
|
* The result is positive if the first is greater, negative if the second
|
||||||
|
* is greater, and 0 if the two are equal.
|
||||||
|
*
|
||||||
|
* @param x First value to compare.
|
||||||
|
* @param y Second value to compare.
|
||||||
|
*
|
||||||
|
* @return positive int if the first value is greater, negative if the second
|
||||||
|
* is greater, and 0 if the two are equal.
|
||||||
|
* @since 1.7
|
||||||
|
*/
|
||||||
|
public static int compare(int x, int y)
|
||||||
|
{
|
||||||
|
return Integer.valueOf(x).compareTo(Integer.valueOf(y));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the number of bits set in x.
|
* Return the number of bits set in x.
|
||||||
* @param x value to examine
|
* @param x value to examine
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* LinkageError.java -- thrown when classes valid at separate compile times
|
/* LinkageError.java -- thrown when classes valid at separate compile times
|
||||||
cannot be linked to each other
|
cannot be linked to each other
|
||||||
Copyright (C) 1998, 1999, 2001, 2002, 2005 Free Software Foundation, Inc.
|
Copyright (C) 1998, 1999, 2001, 2002, 2005, 2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ package java.lang;
|
||||||
*
|
*
|
||||||
* @author Brian Jones
|
* @author Brian Jones
|
||||||
* @author Tom Tromey (tromey@cygnus.com)
|
* @author Tom Tromey (tromey@cygnus.com)
|
||||||
* @status updated to 1.4
|
* @status updated to 1.7
|
||||||
*/
|
*/
|
||||||
public class LinkageError extends Error
|
public class LinkageError extends Error
|
||||||
{
|
{
|
||||||
|
@ -71,4 +71,17 @@ public class LinkageError extends Error
|
||||||
{
|
{
|
||||||
super(s);
|
super(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Construct an LinkageError with detail message and cause.
|
||||||
|
*
|
||||||
|
* @param msg Detail message.
|
||||||
|
* @param cause The cause of this exception, may be null
|
||||||
|
* @since 1.7
|
||||||
|
*/
|
||||||
|
public LinkageError(String msg, Throwable cause)
|
||||||
|
{
|
||||||
|
super(msg, cause);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -584,6 +584,23 @@ public final class Long extends Number implements Comparable<Long>
|
||||||
return value > l.value ? 1 : -1;
|
return value > l.value ? 1 : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compares two unboxed long values.
|
||||||
|
* The result is positive if the first is greater, negative if the second
|
||||||
|
* is greater, and 0 if the two are equal.
|
||||||
|
*
|
||||||
|
* @param x First value to compare.
|
||||||
|
* @param y Second value to compare.
|
||||||
|
*
|
||||||
|
* @return positive int if the first value is greater, negative if the second
|
||||||
|
* is greater, and 0 if the two are equal.
|
||||||
|
* @since 1.7
|
||||||
|
*/
|
||||||
|
public static int compare(long x, long y)
|
||||||
|
{
|
||||||
|
return Long.valueOf(x).compareTo(Long.valueOf(y));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the number of bits set in x.
|
* Return the number of bits set in x.
|
||||||
* @param x value to examine
|
* @param x value to examine
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* NoSuchFieldException.java -- thrown when reflecting a non-existant field
|
/* NoSuchFieldException.java -- thrown when reflecting a non-existant field
|
||||||
Copyright (C) 1998, 1999, 2001, 2002, 2005 Free Software Foundation, Inc.
|
Copyright (C) 1998, 1999, 2001, 2002, 2005, 2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
@ -45,9 +45,9 @@ package java.lang;
|
||||||
* @author Brian Jones
|
* @author Brian Jones
|
||||||
* @author Warren Levy (warrenl@cygnus.com)
|
* @author Warren Levy (warrenl@cygnus.com)
|
||||||
* @since 1.1
|
* @since 1.1
|
||||||
* @status updated to 1.4
|
* @status updated to 1.7
|
||||||
*/
|
*/
|
||||||
public class NoSuchFieldException extends Exception
|
public class NoSuchFieldException extends ReflectiveOperationException
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Compatible with JDK 1.1+.
|
* Compatible with JDK 1.1+.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* NoSuchMethodException.java -- thrown when reflecting a non-existant method
|
/* NoSuchMethodException.java -- thrown when reflecting a non-existant method
|
||||||
Copyright (C) 1998, 1999, 2001, 2002, 2005 Free Software Foundation, Inc.
|
Copyright (C) 1998, 1999, 2001, 2002, 2005, 2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
@ -44,9 +44,9 @@ package java.lang;
|
||||||
*
|
*
|
||||||
* @author Brian Jones
|
* @author Brian Jones
|
||||||
* @author Warren Levy (warrenl@cygnus.com)
|
* @author Warren Levy (warrenl@cygnus.com)
|
||||||
* @status updated to 1.4
|
* @status updated to 1.7
|
||||||
*/
|
*/
|
||||||
public class NoSuchMethodException extends Exception
|
public class NoSuchMethodException extends ReflectiveOperationException
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Compatible with JDK 1.0+.
|
* Compatible with JDK 1.0+.
|
||||||
|
|
|
@ -0,0 +1,88 @@
|
||||||
|
/* ReflectiveOperationException.java -- thrown when reflective operation fails
|
||||||
|
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
GNU Classpath is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
GNU Classpath is distributed in the hope that it will be useful, but
|
||||||
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with GNU Classpath; see the file COPYING. If not, write to the
|
||||||
|
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||||
|
02110-1301 USA.
|
||||||
|
|
||||||
|
Linking this library statically or dynamically with other modules is
|
||||||
|
making a combined work based on this library. Thus, the terms and
|
||||||
|
conditions of the GNU General Public License cover the whole
|
||||||
|
combination.
|
||||||
|
|
||||||
|
As a special exception, the copyright holders of this library give you
|
||||||
|
permission to link this library with independent modules to produce an
|
||||||
|
executable, regardless of the license terms of these independent
|
||||||
|
modules, and to copy and distribute the resulting executable under
|
||||||
|
terms of your choice, provided that you also meet, for each linked
|
||||||
|
independent module, the terms and conditions of the license of that
|
||||||
|
module. An independent module is a module which is not derived from
|
||||||
|
or based on this library. If you modify this library, you may extend
|
||||||
|
this exception to your version of the library, but you are not
|
||||||
|
obligated to do so. If you do not wish to do so, delete this
|
||||||
|
exception statement from your version. */
|
||||||
|
|
||||||
|
|
||||||
|
package java.lang;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This exception is thrown when reflective operations fail.
|
||||||
|
*
|
||||||
|
* @since 1.7
|
||||||
|
*/
|
||||||
|
public class ReflectiveOperationException extends Exception
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 123456789L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an exception without a message.
|
||||||
|
*/
|
||||||
|
public ReflectiveOperationException()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an exception with a message.
|
||||||
|
*
|
||||||
|
* @param s the message
|
||||||
|
*/
|
||||||
|
public ReflectiveOperationException(String s)
|
||||||
|
{
|
||||||
|
super(s);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an exception with a message and a cause.
|
||||||
|
*
|
||||||
|
* @param s the message
|
||||||
|
* @param cause the cause, may be null
|
||||||
|
*/
|
||||||
|
public ReflectiveOperationException(String message, Throwable cause)
|
||||||
|
{
|
||||||
|
super(message, cause);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create an exception with a cause.
|
||||||
|
*
|
||||||
|
* @param cause the cause, may be null
|
||||||
|
*/
|
||||||
|
public ReflectiveOperationException(Throwable cause)
|
||||||
|
{
|
||||||
|
super(cause);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -372,6 +372,23 @@ public final class Short extends Number implements Comparable<Short>
|
||||||
return value - s.value;
|
return value - s.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compares two unboxed short values.
|
||||||
|
* The result is positive if the first is greater, negative if the second
|
||||||
|
* is greater, and 0 if the two are equal.
|
||||||
|
*
|
||||||
|
* @param x First value to compare.
|
||||||
|
* @param y Second value to compare.
|
||||||
|
*
|
||||||
|
* @return positive int if the first value is greater, negative if the second
|
||||||
|
* is greater, and 0 if the two are equal.
|
||||||
|
* @since 1.7
|
||||||
|
*/
|
||||||
|
public static int compare(short x, short y)
|
||||||
|
{
|
||||||
|
return Short.valueOf(x).compareTo(Short.valueOf(y));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reverse the bytes in val.
|
* Reverse the bytes in val.
|
||||||
* @since 1.5
|
* @since 1.5
|
||||||
|
|
|
@ -705,6 +705,8 @@ public final class String
|
||||||
*/
|
*/
|
||||||
public synchronized int codePointAt(int index)
|
public synchronized int codePointAt(int index)
|
||||||
{
|
{
|
||||||
|
if (index < 0 || index >= count)
|
||||||
|
throw new StringIndexOutOfBoundsException(index);
|
||||||
// Use the CharSequence overload as we get better range checking
|
// Use the CharSequence overload as we get better range checking
|
||||||
// this way.
|
// this way.
|
||||||
return Character.codePointAt(this, index);
|
return Character.codePointAt(this, index);
|
||||||
|
@ -716,12 +718,14 @@ public final class String
|
||||||
* <code>index-2</code> to see if they form a supplementary code point.
|
* <code>index-2</code> to see if they form a supplementary code point.
|
||||||
* @param index the index just past the codepoint to get, starting at 0
|
* @param index the index just past the codepoint to get, starting at 0
|
||||||
* @return the codepoint at the specified index
|
* @return the codepoint at the specified index
|
||||||
* @throws IndexOutOfBoundsException if index is negative or >= length()
|
* @throws IndexOutOfBoundsException if index is less than 1 or > length()
|
||||||
* (while unspecified, this is a StringIndexOutOfBoundsException)
|
* (while unspecified, this is a StringIndexOutOfBoundsException)
|
||||||
* @since 1.5
|
* @since 1.5
|
||||||
*/
|
*/
|
||||||
public synchronized int codePointBefore(int index)
|
public synchronized int codePointBefore(int index)
|
||||||
{
|
{
|
||||||
|
if (index < 1 || index > count)
|
||||||
|
throw new StringIndexOutOfBoundsException(index);
|
||||||
// Use the CharSequence overload as we get better range checking
|
// Use the CharSequence overload as we get better range checking
|
||||||
// this way.
|
// this way.
|
||||||
return Character.codePointBefore(this, index);
|
return Character.codePointBefore(this, index);
|
||||||
|
|
|
@ -97,6 +97,8 @@ public final class System
|
||||||
*/
|
*/
|
||||||
public static final PrintStream out = VMSystem.makeStandardOutputStream();
|
public static final PrintStream out = VMSystem.makeStandardOutputStream();
|
||||||
|
|
||||||
|
private static final String LINE_SEPARATOR = SystemProperties.getProperty("line.separator");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The standard output PrintStream. This is assigned at startup and
|
* The standard output PrintStream. This is assigned at startup and
|
||||||
* starts its life perfectly valid. Although it is marked final, you can
|
* starts its life perfectly valid. Although it is marked final, you can
|
||||||
|
@ -712,6 +714,16 @@ public final class System
|
||||||
return Console.console();
|
return Console.console();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the system-dependent line separator.
|
||||||
|
*
|
||||||
|
* @return the system-dependent line separator.
|
||||||
|
*/
|
||||||
|
public static String lineSeparator()
|
||||||
|
{
|
||||||
|
return LINE_SEPARATOR;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is a specialised <code>Collection</code>, providing
|
* This is a specialised <code>Collection</code>, providing
|
||||||
* the necessary provisions for the collections used by the
|
* the necessary provisions for the collections used by the
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* InvocationTargetException.java -- Wrapper exception for reflection
|
/* InvocationTargetException.java -- Wrapper exception for reflection
|
||||||
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2005 Free Software Foundation, Inc.
|
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2005, 2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
@ -50,9 +50,9 @@ package java.lang.reflect;
|
||||||
* @see Method#invoke(Object,Object[])
|
* @see Method#invoke(Object,Object[])
|
||||||
* @see Constructor#newInstance(Object[])
|
* @see Constructor#newInstance(Object[])
|
||||||
* @since 1.1
|
* @since 1.1
|
||||||
* @status updated to 1.4
|
* @status updated to 1.7
|
||||||
*/
|
*/
|
||||||
public class InvocationTargetException extends Exception
|
public class InvocationTargetException extends ReflectiveOperationException
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Compatible with JDK 1.1+.
|
* Compatible with JDK 1.1+.
|
||||||
|
|
|
@ -79,7 +79,7 @@ public interface Member
|
||||||
*
|
*
|
||||||
* @return the class that declared this member
|
* @return the class that declared this member
|
||||||
*/
|
*/
|
||||||
Class getDeclaringClass();
|
Class<?> getDeclaringClass();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the simple name of this member. This will be a valid Java
|
* Gets the simple name of this member. This will be a valid Java
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* java.lang.reflect.Modifier
|
/* java.lang.reflect.Modifier
|
||||||
Copyright (C) 1998, 1999, 2001, 2002, 2005, 2008 Free Software Foundation, Inc.
|
Copyright (C) 1998, 1999, 2001, 2002, 2005, 2008, 2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
@ -299,6 +299,46 @@ public class Modifier
|
||||||
return (mod & VOLATILE) != 0;
|
return (mod & VOLATILE) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 1.7
|
||||||
|
*/
|
||||||
|
public static int classModifiers()
|
||||||
|
{
|
||||||
|
return PUBLIC | PROTECTED | PRIVATE | STATIC | ABSTRACT | FINAL | STRICT;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 1.7
|
||||||
|
*/
|
||||||
|
public static int interfaceModifiers()
|
||||||
|
{
|
||||||
|
return PUBLIC | PROTECTED | PRIVATE | STATIC | ABSTRACT | STRICT;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 1.7
|
||||||
|
*/
|
||||||
|
public static int constructorModifiers()
|
||||||
|
{
|
||||||
|
return PUBLIC | PROTECTED | PRIVATE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 1.7
|
||||||
|
*/
|
||||||
|
public static int methodModifiers()
|
||||||
|
{
|
||||||
|
return PUBLIC | PROTECTED | PRIVATE | STATIC | ABSTRACT | FINAL | STRICT | SYNCHRONIZED | NATIVE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @since 1.7
|
||||||
|
*/
|
||||||
|
public static int fieldModifiers()
|
||||||
|
{
|
||||||
|
return PUBLIC | PROTECTED | PRIVATE | STATIC | FINAL | TRANSIENT | VOLATILE;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a string representation of all the modifiers represented by the
|
* Get a string representation of all the modifiers represented by the
|
||||||
* given int. The keywords are printed in this order:
|
* given int. The keywords are printed in this order:
|
||||||
|
|
|
@ -45,6 +45,7 @@ import java.io.IOException;
|
||||||
* @since 1.4
|
* @since 1.4
|
||||||
*/
|
*/
|
||||||
public abstract class FileLock
|
public abstract class FileLock
|
||||||
|
implements AutoCloseable
|
||||||
{
|
{
|
||||||
private final FileChannel channel;
|
private final FileChannel channel;
|
||||||
private final long position;
|
private final long position;
|
||||||
|
|
|
@ -46,6 +46,7 @@ import java.util.Map;
|
||||||
* @author Aaron M. Renn (arenn@urbanophile.com)
|
* @author Aaron M. Renn (arenn@urbanophile.com)
|
||||||
*/
|
*/
|
||||||
public interface Connection
|
public interface Connection
|
||||||
|
extends AutoCloseable
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* This transaction isolation level indicates that transactions are not
|
* This transaction isolation level indicates that transactions are not
|
||||||
|
|
|
@ -60,6 +60,7 @@ import java.util.Map;
|
||||||
* @author Aaron M. Renn (arenn@urbanophile.com)
|
* @author Aaron M. Renn (arenn@urbanophile.com)
|
||||||
*/
|
*/
|
||||||
public interface ResultSet
|
public interface ResultSet
|
||||||
|
extends AutoCloseable
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* The rows will be processed in order from first to last.
|
* The rows will be processed in order from first to last.
|
||||||
|
|
|
@ -44,6 +44,7 @@ package java.sql;
|
||||||
* @author Aaron M. Renn (arenn@urbanophile.com)
|
* @author Aaron M. Renn (arenn@urbanophile.com)
|
||||||
*/
|
*/
|
||||||
public interface Statement
|
public interface Statement
|
||||||
|
extends AutoCloseable
|
||||||
{
|
{
|
||||||
int CLOSE_CURRENT_RESULT = 1;
|
int CLOSE_CURRENT_RESULT = 1;
|
||||||
int KEEP_CURRENT_RESULT = 2;
|
int KEEP_CURRENT_RESULT = 2;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* AttributedString.java -- Models text with attributes
|
/* AttributedString.java -- Models text with attributes
|
||||||
Copyright (C) 1998, 1999, 2004, 2005, 2006, Free Software Foundation, Inc.
|
Copyright (C) 1998, 1999, 2004, 2005, 2006, 2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
@ -48,6 +48,8 @@ import java.util.Iterator;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
import static java.text.AttributedCharacterIterator.Attribute;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class models a <code>String</code> with attributes over various
|
* This class models a <code>String</code> with attributes over various
|
||||||
* subranges of the string. It allows applications to access this
|
* subranges of the string. It allows applications to access this
|
||||||
|
@ -68,7 +70,7 @@ public class AttributedString
|
||||||
{
|
{
|
||||||
|
|
||||||
/** A Map of the attributes */
|
/** A Map of the attributes */
|
||||||
Map attribs;
|
Map<? extends Attribute, ?> attribs;
|
||||||
|
|
||||||
/** The beginning index of the attributes */
|
/** The beginning index of the attributes */
|
||||||
int beginIndex;
|
int beginIndex;
|
||||||
|
@ -83,7 +85,8 @@ public class AttributedString
|
||||||
* @param beginIndex the start index.
|
* @param beginIndex the start index.
|
||||||
* @param endIndex the end index.
|
* @param endIndex the end index.
|
||||||
*/
|
*/
|
||||||
AttributeRange(Map attribs, int beginIndex, int endIndex)
|
AttributeRange(Map<? extends Attribute, ?> attribs,
|
||||||
|
int beginIndex, int endIndex)
|
||||||
{
|
{
|
||||||
this.attribs = attribs;
|
this.attribs = attribs;
|
||||||
this.beginIndex = beginIndex;
|
this.beginIndex = beginIndex;
|
||||||
|
@ -122,7 +125,7 @@ public class AttributedString
|
||||||
* @param attributes The attribute list.
|
* @param attributes The attribute list.
|
||||||
*/
|
*/
|
||||||
public AttributedString(String str,
|
public AttributedString(String str,
|
||||||
Map<? extends AttributedCharacterIterator.Attribute, ?> attributes)
|
Map<? extends Attribute, ?> attributes)
|
||||||
{
|
{
|
||||||
this(str);
|
this(str);
|
||||||
|
|
||||||
|
@ -178,7 +181,7 @@ public class AttributedString
|
||||||
* <code>null</code> to include all attributes.
|
* <code>null</code> to include all attributes.
|
||||||
*/
|
*/
|
||||||
public AttributedString(AttributedCharacterIterator aci, int begin, int end,
|
public AttributedString(AttributedCharacterIterator aci, int begin, int end,
|
||||||
AttributedCharacterIterator.Attribute[] attributes)
|
Attribute[] attributes)
|
||||||
{
|
{
|
||||||
// Validate some arguments
|
// Validate some arguments
|
||||||
if ((begin < 0) || (end < begin) || end > aci.getEndIndex())
|
if ((begin < 0) || (end < begin) || end > aci.getEndIndex())
|
||||||
|
@ -187,29 +190,28 @@ public class AttributedString
|
||||||
CPStringBuilder sb = new CPStringBuilder("");
|
CPStringBuilder sb = new CPStringBuilder("");
|
||||||
|
|
||||||
// Get the valid attribute list
|
// Get the valid attribute list
|
||||||
Set allAttribs = aci.getAllAttributeKeys();
|
Set<Attribute> allAttribs = aci.getAllAttributeKeys();
|
||||||
if (attributes != null)
|
if (attributes != null)
|
||||||
allAttribs.retainAll(Arrays.asList(attributes));
|
allAttribs.retainAll(Arrays.asList(attributes));
|
||||||
|
|
||||||
// Loop through and extract the attributes
|
// Loop through and extract the attributes
|
||||||
char c = aci.setIndex(begin);
|
char c = aci.setIndex(begin);
|
||||||
|
|
||||||
ArrayList accum = new ArrayList();
|
ArrayList<AttributeRange> accum = new ArrayList<AttributeRange>();
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
sb.append(c);
|
sb.append(c);
|
||||||
|
|
||||||
Iterator iter = allAttribs.iterator();
|
Iterator<Attribute> iter = allAttribs.iterator();
|
||||||
while(iter.hasNext())
|
while(iter.hasNext())
|
||||||
{
|
{
|
||||||
Object obj = iter.next();
|
Object obj = iter.next();
|
||||||
|
|
||||||
// What should we do if this is not true?
|
// What should we do if this is not true?
|
||||||
if (!(obj instanceof AttributedCharacterIterator.Attribute))
|
if (!(obj instanceof Attribute))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
AttributedCharacterIterator.Attribute attrib =
|
Attribute attrib = (Attribute)obj;
|
||||||
(AttributedCharacterIterator.Attribute)obj;
|
|
||||||
|
|
||||||
// Make sure the attribute is defined.
|
// Make sure the attribute is defined.
|
||||||
Object attribObj = aci.getAttribute(attrib);
|
Object attribObj = aci.getAttribute(attrib);
|
||||||
|
@ -237,7 +239,7 @@ public class AttributedString
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a map object. Yes this will only contain one attribute
|
// Create a map object. Yes this will only contain one attribute
|
||||||
Map newMap = new Hashtable();
|
Map<Attribute,Object> newMap = new Hashtable<Attribute,Object>();
|
||||||
newMap.put(attrib, attribObj);
|
newMap.put(attrib, attribObj);
|
||||||
|
|
||||||
// Add it to the attribute list.
|
// Add it to the attribute list.
|
||||||
|
@ -249,7 +251,7 @@ public class AttributedString
|
||||||
while( aci.getIndex() < end );
|
while( aci.getIndex() < end );
|
||||||
|
|
||||||
attribs = new AttributeRange[accum.size()];
|
attribs = new AttributeRange[accum.size()];
|
||||||
attribs = (AttributeRange[]) accum.toArray(attribs);
|
attribs = accum.toArray(attribs);
|
||||||
|
|
||||||
sci = new StringCharacterIterator(sb.toString());
|
sci = new StringCharacterIterator(sb.toString());
|
||||||
}
|
}
|
||||||
|
@ -260,8 +262,7 @@ public class AttributedString
|
||||||
* @param attrib The attribute to add.
|
* @param attrib The attribute to add.
|
||||||
* @param value The value of the attribute.
|
* @param value The value of the attribute.
|
||||||
*/
|
*/
|
||||||
public void addAttribute(AttributedCharacterIterator.Attribute attrib,
|
public void addAttribute(Attribute attrib, Object value)
|
||||||
Object value)
|
|
||||||
{
|
{
|
||||||
addAttribute(attrib, value, 0, sci.getEndIndex());
|
addAttribute(attrib, value, 0, sci.getEndIndex());
|
||||||
}
|
}
|
||||||
|
@ -278,14 +279,13 @@ public class AttributedString
|
||||||
* @exception IllegalArgumentException If attribute is <code>null</code> or
|
* @exception IllegalArgumentException If attribute is <code>null</code> or
|
||||||
* the subrange is not valid.
|
* the subrange is not valid.
|
||||||
*/
|
*/
|
||||||
public void addAttribute(AttributedCharacterIterator.Attribute attrib,
|
public void addAttribute(Attribute attrib, Object value, int begin, int end)
|
||||||
Object value, int begin, int end)
|
|
||||||
{
|
{
|
||||||
if (attrib == null)
|
if (attrib == null)
|
||||||
throw new IllegalArgumentException("null attribute");
|
throw new IllegalArgumentException("null attribute");
|
||||||
if (end <= begin)
|
if (end <= begin)
|
||||||
throw new IllegalArgumentException("Requires end > begin");
|
throw new IllegalArgumentException("Requires end > begin");
|
||||||
HashMap hm = new HashMap();
|
HashMap<Attribute,Object> hm = new HashMap<Attribute,Object>();
|
||||||
hm.put(attrib, value);
|
hm.put(attrib, value);
|
||||||
|
|
||||||
addAttributes(hm, begin, end);
|
addAttributes(hm, begin, end);
|
||||||
|
@ -303,7 +303,7 @@ public class AttributedString
|
||||||
* <code>null</code>.
|
* <code>null</code>.
|
||||||
* @throws IllegalArgumentException if the subrange is not valid.
|
* @throws IllegalArgumentException if the subrange is not valid.
|
||||||
*/
|
*/
|
||||||
public void addAttributes(Map<? extends AttributedCharacterIterator.Attribute, ?> attributes,
|
public void addAttributes(Map<? extends Attribute, ?> attributes,
|
||||||
int beginIndex, int endIndex)
|
int beginIndex, int endIndex)
|
||||||
{
|
{
|
||||||
if (attributes == null)
|
if (attributes == null)
|
||||||
|
@ -343,8 +343,7 @@ public class AttributedString
|
||||||
*
|
*
|
||||||
* @return An <code>AttributedCharacterIterator</code> for this string.
|
* @return An <code>AttributedCharacterIterator</code> for this string.
|
||||||
*/
|
*/
|
||||||
public AttributedCharacterIterator getIterator(
|
public AttributedCharacterIterator getIterator(Attribute[] attributes)
|
||||||
AttributedCharacterIterator.Attribute[] attributes)
|
|
||||||
{
|
{
|
||||||
return(getIterator(attributes, 0, sci.getEndIndex()));
|
return(getIterator(attributes, 0, sci.getEndIndex()));
|
||||||
}
|
}
|
||||||
|
@ -363,8 +362,7 @@ public class AttributedString
|
||||||
*
|
*
|
||||||
* @return An <code>AttributedCharacterIterator</code> for this string.
|
* @return An <code>AttributedCharacterIterator</code> for this string.
|
||||||
*/
|
*/
|
||||||
public AttributedCharacterIterator getIterator(
|
public AttributedCharacterIterator getIterator(Attribute[] attributes,
|
||||||
AttributedCharacterIterator.Attribute[] attributes,
|
|
||||||
int beginIndex, int endIndex)
|
int beginIndex, int endIndex)
|
||||||
{
|
{
|
||||||
if ((beginIndex < 0) || (endIndex > sci.getEndIndex()) ||
|
if ((beginIndex < 0) || (endIndex > sci.getEndIndex()) ||
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* AttributedStringIterator.java -- Class to iterate over AttributedString
|
/* AttributedStringIterator.java -- Class to iterate over AttributedString
|
||||||
Copyright (C) 1998, 1999, 2004, 2005, 2006, Free Software Foundation, Inc.
|
Copyright (C) 1998, 1999, 2004, 2005, 2006, 2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
@ -44,6 +44,8 @@ import java.util.Iterator;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
import static java.text.AttributedCharacterIterator.Attribute;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class implements the AttributedCharacterIterator interface. It
|
* This class implements the AttributedCharacterIterator interface. It
|
||||||
* is used by AttributedString.getIterator().
|
* is used by AttributedString.getIterator().
|
||||||
|
@ -67,7 +69,7 @@ class AttributedStringIterator implements AttributedCharacterIterator
|
||||||
* The list of attributes that the user is interested in. We may,
|
* The list of attributes that the user is interested in. We may,
|
||||||
* at our option, not return any other attributes.
|
* at our option, not return any other attributes.
|
||||||
*/
|
*/
|
||||||
private AttributedCharacterIterator.Attribute[] restricts;
|
private Attribute[] restricts;
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
@ -155,9 +157,9 @@ class AttributedStringIterator implements AttributedCharacterIterator
|
||||||
* Returns a list of all the attribute keys that are defined anywhere
|
* Returns a list of all the attribute keys that are defined anywhere
|
||||||
* on this string.
|
* on this string.
|
||||||
*/
|
*/
|
||||||
public Set getAllAttributeKeys()
|
public Set<Attribute> getAllAttributeKeys()
|
||||||
{
|
{
|
||||||
HashSet s = new HashSet();
|
HashSet<Attribute> s = new HashSet<Attribute>();
|
||||||
if (attribs == null)
|
if (attribs == null)
|
||||||
return(s);
|
return(s);
|
||||||
|
|
||||||
|
@ -167,8 +169,7 @@ class AttributedStringIterator implements AttributedCharacterIterator
|
||||||
|| attribs[i].endIndex <= getBeginIndex())
|
|| attribs[i].endIndex <= getBeginIndex())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
Set key_set = attribs[i].attribs.keySet();
|
Iterator<? extends Attribute> iter = attribs[i].attribs.keySet().iterator();
|
||||||
Iterator iter = key_set.iterator();
|
|
||||||
while (iter.hasNext())
|
while (iter.hasNext())
|
||||||
{
|
{
|
||||||
s.add(iter.next());
|
s.add(iter.next());
|
||||||
|
@ -190,14 +191,14 @@ class AttributedStringIterator implements AttributedCharacterIterator
|
||||||
return getRunLimit(getAllAttributeKeys());
|
return getRunLimit(getAllAttributeKeys());
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getRunLimit(AttributedCharacterIterator.Attribute attrib)
|
public int getRunLimit(Attribute attrib)
|
||||||
{
|
{
|
||||||
HashSet s = new HashSet();
|
HashSet<Attribute> s = new HashSet<Attribute>();
|
||||||
s.add(attrib);
|
s.add(attrib);
|
||||||
return(getRunLimit(s));
|
return(getRunLimit(s));
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized int getRunLimit(Set attributeSet)
|
public synchronized int getRunLimit(Set<? extends Attribute> attributeSet)
|
||||||
{
|
{
|
||||||
if (attributeSet == null)
|
if (attributeSet == null)
|
||||||
return ci.getEndIndex();
|
return ci.getEndIndex();
|
||||||
|
@ -207,13 +208,13 @@ class AttributedStringIterator implements AttributedCharacterIterator
|
||||||
int limit = current;
|
int limit = current;
|
||||||
if (current == end)
|
if (current == end)
|
||||||
return end;
|
return end;
|
||||||
Map runValues = getAttributes();
|
Map<Attribute,Object> runValues = getAttributes();
|
||||||
while (limit < end)
|
while (limit < end)
|
||||||
{
|
{
|
||||||
Iterator iterator = attributeSet.iterator();
|
Iterator<? extends Attribute> iterator = attributeSet.iterator();
|
||||||
while (iterator.hasNext())
|
while (iterator.hasNext())
|
||||||
{
|
{
|
||||||
Attribute attributeKey = (Attribute) iterator.next();
|
Attribute attributeKey = iterator.next();
|
||||||
Object v1 = runValues.get(attributeKey);
|
Object v1 = runValues.get(attributeKey);
|
||||||
Object v2 = getAttribute(attributeKey, limit + 1);
|
Object v2 = getAttribute(attributeKey, limit + 1);
|
||||||
boolean changed = false;
|
boolean changed = false;
|
||||||
|
@ -262,11 +263,11 @@ class AttributedStringIterator implements AttributedCharacterIterator
|
||||||
*
|
*
|
||||||
* return The index of the first character in the run.
|
* return The index of the first character in the run.
|
||||||
*/
|
*/
|
||||||
public int getRunStart(AttributedCharacterIterator.Attribute attrib)
|
public int getRunStart(Attribute attrib)
|
||||||
{
|
{
|
||||||
if (attrib == null)
|
if (attrib == null)
|
||||||
return ci.getBeginIndex();
|
return ci.getBeginIndex();
|
||||||
HashSet s = new HashSet();
|
HashSet<Attribute> s = new HashSet<Attribute>();
|
||||||
s.add(attrib);
|
s.add(attrib);
|
||||||
return(getRunStart(s));
|
return(getRunStart(s));
|
||||||
}
|
}
|
||||||
|
@ -279,7 +280,7 @@ class AttributedStringIterator implements AttributedCharacterIterator
|
||||||
*
|
*
|
||||||
* return The index of the first character in the run.
|
* return The index of the first character in the run.
|
||||||
*/
|
*/
|
||||||
public int getRunStart(Set attributeSet)
|
public int getRunStart(Set<? extends Attribute> attributeSet)
|
||||||
{
|
{
|
||||||
if (attributeSet == null)
|
if (attributeSet == null)
|
||||||
return ci.getBeginIndex();
|
return ci.getBeginIndex();
|
||||||
|
@ -289,14 +290,14 @@ class AttributedStringIterator implements AttributedCharacterIterator
|
||||||
int start = current;
|
int start = current;
|
||||||
if (start == begin)
|
if (start == begin)
|
||||||
return begin;
|
return begin;
|
||||||
Map runValues = getAttributes();
|
Map<Attribute, Object> runValues = getAttributes();
|
||||||
int prev = start - 1;
|
int prev = start - 1;
|
||||||
while (start > begin)
|
while (start > begin)
|
||||||
{
|
{
|
||||||
Iterator iterator = attributeSet.iterator();
|
Iterator<? extends Attribute> iterator = attributeSet.iterator();
|
||||||
while (iterator.hasNext())
|
while (iterator.hasNext())
|
||||||
{
|
{
|
||||||
Attribute attributeKey = (Attribute) iterator.next();
|
Attribute attributeKey = iterator.next();
|
||||||
Object v1 = runValues.get(attributeKey);
|
Object v1 = runValues.get(attributeKey);
|
||||||
Object v2 = getAttribute(attributeKey, prev);
|
Object v2 = getAttribute(attributeKey, prev);
|
||||||
boolean changed = false;
|
boolean changed = false;
|
||||||
|
@ -340,7 +341,7 @@ class AttributedStringIterator implements AttributedCharacterIterator
|
||||||
{
|
{
|
||||||
if (pos >= attribs[i].beginIndex && pos < attribs[i].endIndex)
|
if (pos >= attribs[i].beginIndex && pos < attribs[i].endIndex)
|
||||||
{
|
{
|
||||||
Set keys = attribs[i].attribs.keySet();
|
Set<? extends Attribute> keys = attribs[i].attribs.keySet();
|
||||||
if (keys.contains(key))
|
if (keys.contains(key))
|
||||||
{
|
{
|
||||||
return attribs[i].attribs.get(key);
|
return attribs[i].attribs.get(key);
|
||||||
|
@ -370,9 +371,9 @@ class AttributedStringIterator implements AttributedCharacterIterator
|
||||||
* Return a list of all the attributes and values defined for this
|
* Return a list of all the attributes and values defined for this
|
||||||
* character
|
* character
|
||||||
*/
|
*/
|
||||||
public Map getAttributes()
|
public Map<Attribute,Object> getAttributes()
|
||||||
{
|
{
|
||||||
HashMap m = new HashMap();
|
HashMap<Attribute,Object> m = new HashMap<Attribute,Object>();
|
||||||
if (attribs == null)
|
if (attribs == null)
|
||||||
return(m);
|
return(m);
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Bidi.java -- Bidirectional Algorithm implementation
|
/* Bidi.java -- Bidirectional Algorithm implementation
|
||||||
Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
Copyright (C) 2005, 2006, 2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ public final class Bidi
|
||||||
// A list of indices where a formatting code was found. These
|
// A list of indices where a formatting code was found. These
|
||||||
// are indicies into the original text -- not into the text after
|
// are indicies into the original text -- not into the text after
|
||||||
// the codes have been removed.
|
// the codes have been removed.
|
||||||
private ArrayList formatterIndices;
|
private ArrayList<Integer> formatterIndices;
|
||||||
|
|
||||||
// Indices of the starts of runs in the text.
|
// Indices of the starts of runs in the text.
|
||||||
private int[] runs;
|
private int[] runs;
|
||||||
|
@ -161,13 +161,13 @@ public final class Bidi
|
||||||
if (val instanceof NumericShaper)
|
if (val instanceof NumericShaper)
|
||||||
shaper = (NumericShaper) val;
|
shaper = (NumericShaper) val;
|
||||||
|
|
||||||
char[] text = new char[iter.getEndIndex() - iter.getBeginIndex()];
|
text = new char[iter.getEndIndex() - iter.getBeginIndex()];
|
||||||
this.embeddings = new byte[this.text.length];
|
embeddings = new byte[text.length];
|
||||||
this.embeddingOffset = 0;
|
embeddingOffset = 0;
|
||||||
this.length = text.length;
|
length = text.length;
|
||||||
for (int i = 0; i < this.text.length; ++i)
|
for (int i = 0; i < text.length; ++i)
|
||||||
{
|
{
|
||||||
this.text[i] = iter.current();
|
text[i] = iter.current();
|
||||||
|
|
||||||
val = iter.getAttribute(TextAttribute.BIDI_EMBEDDING);
|
val = iter.getAttribute(TextAttribute.BIDI_EMBEDDING);
|
||||||
if (val instanceof Integer)
|
if (val instanceof Integer)
|
||||||
|
@ -178,13 +178,13 @@ public final class Bidi
|
||||||
bval = 0;
|
bval = 0;
|
||||||
else
|
else
|
||||||
bval = (byte) ival;
|
bval = (byte) ival;
|
||||||
this.embeddings[i] = bval;
|
embeddings[i] = bval;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Invoke the numeric shaper, if specified.
|
// Invoke the numeric shaper, if specified.
|
||||||
if (shaper != null)
|
if (shaper != null)
|
||||||
shaper.shape(this.text, 0, this.length);
|
shaper.shape(text, 0, length);
|
||||||
|
|
||||||
runBidi();
|
runBidi();
|
||||||
}
|
}
|
||||||
|
@ -404,7 +404,7 @@ public final class Bidi
|
||||||
{
|
{
|
||||||
// Mark this character for removal.
|
// Mark this character for removal.
|
||||||
if (formatterIndices == null)
|
if (formatterIndices == null)
|
||||||
formatterIndices = new ArrayList();
|
formatterIndices = new ArrayList<Integer>();
|
||||||
formatterIndices.add(Integer.valueOf(i));
|
formatterIndices.add(Integer.valueOf(i));
|
||||||
}
|
}
|
||||||
else if (directionalOverride != -1)
|
else if (directionalOverride != -1)
|
||||||
|
@ -427,7 +427,7 @@ public final class Bidi
|
||||||
if (i == size)
|
if (i == size)
|
||||||
nextFmt = length;
|
nextFmt = length;
|
||||||
else
|
else
|
||||||
nextFmt = ((Integer) formatterIndices.get(i)).intValue();
|
nextFmt = formatterIndices.get(i).intValue();
|
||||||
// Non-formatter codes are from 'input' to 'nextFmt'.
|
// Non-formatter codes are from 'input' to 'nextFmt'.
|
||||||
int len = nextFmt - input;
|
int len = nextFmt - input;
|
||||||
System.arraycopy(levels, input, levels, output, len);
|
System.arraycopy(levels, input, levels, output, len);
|
||||||
|
@ -716,7 +716,7 @@ public final class Bidi
|
||||||
// Process from the end as we are copying the array over itself here.
|
// Process from the end as we are copying the array over itself here.
|
||||||
for (int index = formatterIndices.size() - 1; index >= 0; --index)
|
for (int index = formatterIndices.size() - 1; index >= 0; --index)
|
||||||
{
|
{
|
||||||
int nextFmt = ((Integer) formatterIndices.get(index)).intValue();
|
int nextFmt = formatterIndices.get(index).intValue();
|
||||||
|
|
||||||
// nextFmt points to a location in the original array. So,
|
// nextFmt points to a location in the original array. So,
|
||||||
// nextFmt+1 is the target of our copying. output is the location
|
// nextFmt+1 is the target of our copying. output is the location
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* BreakIterator.java -- Breaks text into elements
|
/* BreakIterator.java -- Breaks text into elements
|
||||||
Copyright (C) 1998, 1999, 2001, 2004, 2005, 2007
|
Copyright (C) 1998, 1999, 2001, 2004, 2005, 2007, 2012
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
@ -160,7 +160,7 @@ public abstract class BreakIterator implements Cloneable
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Class k = Class.forName(className);
|
Class<?> k = Class.forName(className);
|
||||||
return (BreakIterator) k.newInstance();
|
return (BreakIterator) k.newInstance();
|
||||||
}
|
}
|
||||||
catch (ClassNotFoundException x1)
|
catch (ClassNotFoundException x1)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* ChoiceFormat.java -- Format over a range of numbers
|
/* ChoiceFormat.java -- Format over a range of numbers
|
||||||
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005
|
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2012
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
@ -98,8 +98,8 @@ public class ChoiceFormat extends NumberFormat
|
||||||
// This isn't explicitly documented. But for instance we accept
|
// This isn't explicitly documented. But for instance we accept
|
||||||
// '#' as a literal hash in a format string.
|
// '#' as a literal hash in a format string.
|
||||||
int index = 0, max = newPattern.length();
|
int index = 0, max = newPattern.length();
|
||||||
Vector stringVec = new Vector ();
|
Vector<String> stringVec = new Vector<String> ();
|
||||||
Vector limitVec = new Vector ();
|
Vector<Double> limitVec = new Vector<Double> ();
|
||||||
final CPStringBuilder buf = new CPStringBuilder ();
|
final CPStringBuilder buf = new CPStringBuilder ();
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
|
@ -159,7 +159,7 @@ public class ChoiceFormat extends NumberFormat
|
||||||
choiceLimits = new double[limitVec.size()];
|
choiceLimits = new double[limitVec.size()];
|
||||||
for (int i = 0; i < choiceLimits.length; ++i)
|
for (int i = 0; i < choiceLimits.length; ++i)
|
||||||
{
|
{
|
||||||
Double d = (Double) limitVec.elementAt(i);
|
Double d = limitVec.elementAt(i);
|
||||||
choiceLimits[i] = d.doubleValue();
|
choiceLimits[i] = d.doubleValue();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* CollationElementIterator.java -- Walks through collation elements
|
/* CollationElementIterator.java -- Walks through collation elements
|
||||||
Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004 Free Software Foundation
|
Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2012 Free Software Foundation
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
@ -91,12 +91,12 @@ public final class CollationElementIterator
|
||||||
* Array containing the collation decomposition of the
|
* Array containing the collation decomposition of the
|
||||||
* text given to the constructor.
|
* text given to the constructor.
|
||||||
*/
|
*/
|
||||||
private RuleBasedCollator.CollationElement[] text_decomposition;
|
private RuleBasedCollator.CollationElement[] textDecomposition;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Array containing the index of the specified block.
|
* Array containing the index of the specified block.
|
||||||
*/
|
*/
|
||||||
private int[] text_indexes;
|
private int[] textIndexes;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method initializes a new instance of <code>CollationElementIterator</code>
|
* This method initializes a new instance of <code>CollationElementIterator</code>
|
||||||
|
@ -130,12 +130,12 @@ public final class CollationElementIterator
|
||||||
|
|
||||||
RuleBasedCollator.CollationElement nextBlock()
|
RuleBasedCollator.CollationElement nextBlock()
|
||||||
{
|
{
|
||||||
if (index >= text_decomposition.length)
|
if (index >= textDecomposition.length)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
RuleBasedCollator.CollationElement e = text_decomposition[index];
|
RuleBasedCollator.CollationElement e = textDecomposition[index];
|
||||||
|
|
||||||
textIndex = text_indexes[index+1];
|
textIndex = textIndexes[index+1];
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
|
@ -148,9 +148,9 @@ public final class CollationElementIterator
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
index--;
|
index--;
|
||||||
RuleBasedCollator.CollationElement e = text_decomposition[index];
|
RuleBasedCollator.CollationElement e = textDecomposition[index];
|
||||||
|
|
||||||
textIndex = text_indexes[index+1];
|
textIndex = textIndexes[index+1];
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
|
@ -268,23 +268,23 @@ public final class CollationElementIterator
|
||||||
|
|
||||||
String work_text = text.intern();
|
String work_text = text.intern();
|
||||||
|
|
||||||
ArrayList a_element = new ArrayList();
|
ArrayList<RuleBasedCollator.CollationElement> aElement = new ArrayList<RuleBasedCollator.CollationElement>();
|
||||||
ArrayList a_idx = new ArrayList();
|
ArrayList<Integer> aIdx = new ArrayList<Integer>();
|
||||||
|
|
||||||
// Build element collection ordered as they come in "text".
|
// Build element collection ordered as they come in "text".
|
||||||
while (idx < work_text.length())
|
while (idx < work_text.length())
|
||||||
{
|
{
|
||||||
String key, key_old;
|
String key, keyOld;
|
||||||
|
|
||||||
Object object = null;
|
Object object = null;
|
||||||
int p = 1;
|
int p = 1;
|
||||||
|
|
||||||
// IMPROVE: use a TreeMap with a prefix-ordering rule.
|
// IMPROVE: use a TreeMap with a prefix-ordering rule.
|
||||||
key_old = key = null;
|
keyOld = key = null;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (object != null)
|
if (object != null)
|
||||||
key_old = key;
|
keyOld = key;
|
||||||
key = work_text.substring (idx, idx+p);
|
key = work_text.substring (idx, idx+p);
|
||||||
object = collator.prefix_tree.get (key);
|
object = collator.prefix_tree.get (key);
|
||||||
if (object != null && idx < alreadyExpanded)
|
if (object != null && idx < alreadyExpanded)
|
||||||
|
@ -294,7 +294,7 @@ public final class CollationElementIterator
|
||||||
prefix.expansion.startsWith(work_text.substring(0, idx)))
|
prefix.expansion.startsWith(work_text.substring(0, idx)))
|
||||||
{
|
{
|
||||||
object = null;
|
object = null;
|
||||||
key = key_old;
|
key = keyOld;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
p++;
|
p++;
|
||||||
|
@ -302,7 +302,7 @@ public final class CollationElementIterator
|
||||||
while (idx+p <= work_text.length());
|
while (idx+p <= work_text.length());
|
||||||
|
|
||||||
if (object == null)
|
if (object == null)
|
||||||
key = key_old;
|
key = keyOld;
|
||||||
|
|
||||||
RuleBasedCollator.CollationElement prefix =
|
RuleBasedCollator.CollationElement prefix =
|
||||||
(RuleBasedCollator.CollationElement) collator.prefix_tree.get (key);
|
(RuleBasedCollator.CollationElement) collator.prefix_tree.get (key);
|
||||||
|
@ -322,8 +322,8 @@ public final class CollationElementIterator
|
||||||
RuleBasedCollator.CollationElement e =
|
RuleBasedCollator.CollationElement e =
|
||||||
collator.getDefaultAccentedElement (work_text.charAt (idx));
|
collator.getDefaultAccentedElement (work_text.charAt (idx));
|
||||||
|
|
||||||
a_element.add (e);
|
aElement.add (e);
|
||||||
a_idx.add (new Integer(idx_idx));
|
aIdx.add (Integer.valueOf(idx_idx));
|
||||||
idx++;
|
idx++;
|
||||||
alreadyExpanded--;
|
alreadyExpanded--;
|
||||||
if (alreadyExpanded == 0)
|
if (alreadyExpanded == 0)
|
||||||
|
@ -342,15 +342,15 @@ public final class CollationElementIterator
|
||||||
/* This is a normal character. */
|
/* This is a normal character. */
|
||||||
RuleBasedCollator.CollationElement e =
|
RuleBasedCollator.CollationElement e =
|
||||||
collator.getDefaultElement (work_text.charAt (idx));
|
collator.getDefaultElement (work_text.charAt (idx));
|
||||||
Integer i_ref = new Integer(idx_idx);
|
Integer iRef = Integer.valueOf(idx_idx);
|
||||||
|
|
||||||
/* Don't forget to mark it as a special sequence so the
|
/* Don't forget to mark it as a special sequence so the
|
||||||
* string can be ordered.
|
* string can be ordered.
|
||||||
*/
|
*/
|
||||||
a_element.add (RuleBasedCollator.SPECIAL_UNKNOWN_SEQ);
|
aElement.add (RuleBasedCollator.SPECIAL_UNKNOWN_SEQ);
|
||||||
a_idx.add (i_ref);
|
aIdx.add (iRef);
|
||||||
a_element.add (e);
|
aElement.add (e);
|
||||||
a_idx.add (i_ref);
|
aIdx.add (iRef);
|
||||||
idx_idx++;
|
idx_idx++;
|
||||||
idx++;
|
idx++;
|
||||||
}
|
}
|
||||||
|
@ -367,8 +367,8 @@ public final class CollationElementIterator
|
||||||
work_text = prefix.expansion
|
work_text = prefix.expansion
|
||||||
+ work_text.substring (idx+prefix.key.length());
|
+ work_text.substring (idx+prefix.key.length());
|
||||||
idx = 0;
|
idx = 0;
|
||||||
a_element.add (prefix);
|
aElement.add (prefix);
|
||||||
a_idx.add (new Integer(idx_idx));
|
aIdx.add (Integer.valueOf(idx_idx));
|
||||||
if (alreadyExpanded == 0)
|
if (alreadyExpanded == 0)
|
||||||
idxToMove = prefix.key.length();
|
idxToMove = prefix.key.length();
|
||||||
alreadyExpanded += prefix.expansion.length()-prefix.key.length();
|
alreadyExpanded += prefix.expansion.length()-prefix.key.length();
|
||||||
|
@ -378,8 +378,8 @@ public final class CollationElementIterator
|
||||||
/* Third case: the simplest. We have got the prefix and it
|
/* Third case: the simplest. We have got the prefix and it
|
||||||
* has not to be expanded.
|
* has not to be expanded.
|
||||||
*/
|
*/
|
||||||
a_element.add (prefix);
|
aElement.add (prefix);
|
||||||
a_idx.add (new Integer(idx_idx));
|
aIdx.add (Integer.valueOf(idx_idx));
|
||||||
idx += prefix.key.length();
|
idx += prefix.key.length();
|
||||||
/* If the sequence is in an expansion, we must decrease the
|
/* If the sequence is in an expansion, we must decrease the
|
||||||
* counter.
|
* counter.
|
||||||
|
@ -398,14 +398,13 @@ public final class CollationElementIterator
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
text_decomposition = (RuleBasedCollator.CollationElement[])
|
textDecomposition = aElement.toArray(new RuleBasedCollator.CollationElement[aElement.size()]);
|
||||||
a_element.toArray(new RuleBasedCollator.CollationElement[a_element.size()]);
|
textIndexes = new int[aIdx.size()+1];
|
||||||
text_indexes = new int[a_idx.size()+1];
|
for (int i = 0; i < aIdx.size(); i++)
|
||||||
for (int i = 0; i < a_idx.size(); i++)
|
|
||||||
{
|
{
|
||||||
text_indexes[i] = ((Integer)a_idx.get(i)).intValue();
|
textIndexes[i] = aIdx.get(i).intValue();
|
||||||
}
|
}
|
||||||
text_indexes[a_idx.size()] = text.length();
|
textIndexes[aIdx.size()] = text.length();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -460,19 +459,19 @@ public final class CollationElementIterator
|
||||||
if (offset > (text.getEndIndex() - 1))
|
if (offset > (text.getEndIndex() - 1))
|
||||||
throw new IllegalArgumentException("Offset too large: " + offset);
|
throw new IllegalArgumentException("Offset too large: " + offset);
|
||||||
|
|
||||||
for (index = 0; index < text_decomposition.length; index++)
|
for (index = 0; index < textDecomposition.length; index++)
|
||||||
{
|
{
|
||||||
if (offset <= text_indexes[index])
|
if (offset <= textIndexes[index])
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* As text_indexes[0] == 0, we should not have to take care whether index is
|
* As textIndexes[0] == 0, we should not have to take care whether index is
|
||||||
* greater than 0. It is always.
|
* greater than 0. It is always.
|
||||||
*/
|
*/
|
||||||
if (text_indexes[index] == offset)
|
if (textIndexes[index] == offset)
|
||||||
textIndex = offset;
|
textIndex = offset;
|
||||||
else
|
else
|
||||||
textIndex = text_indexes[index-1];
|
textIndex = textIndexes[index-1];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -56,6 +56,11 @@ import java.util.ResourceBundle;
|
||||||
import java.util.ServiceLoader;
|
import java.util.ServiceLoader;
|
||||||
import java.util.TimeZone;
|
import java.util.TimeZone;
|
||||||
|
|
||||||
|
import java.util.concurrent.ConcurrentMap;
|
||||||
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import java.util.spi.TimeZoneNameProvider;
|
import java.util.spi.TimeZoneNameProvider;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -71,14 +76,6 @@ import java.util.spi.TimeZoneNameProvider;
|
||||||
*/
|
*/
|
||||||
public class DateFormatSymbols implements java.io.Serializable, Cloneable
|
public class DateFormatSymbols implements java.io.Serializable, Cloneable
|
||||||
{
|
{
|
||||||
String[] ampms;
|
|
||||||
String[] eras;
|
|
||||||
private String localPatternChars;
|
|
||||||
String[] months;
|
|
||||||
String[] shortMonths;
|
|
||||||
String[] shortWeekdays;
|
|
||||||
String[] weekdays;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The set of properties for obtaining the metazone data.
|
* The set of properties for obtaining the metazone data.
|
||||||
*/
|
*/
|
||||||
|
@ -100,6 +97,173 @@ public class DateFormatSymbols implements java.io.Serializable, Cloneable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static final Pattern ZONE_SEP = Pattern.compile("\u00a9");
|
||||||
|
|
||||||
|
private static final Pattern FIELD_SEP = Pattern.compile("\u00ae");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class for storing DateFormatSymbols data parsed from the property files.
|
||||||
|
*/
|
||||||
|
private static class DFSData
|
||||||
|
{
|
||||||
|
private String[] ampms;
|
||||||
|
private String[] eras;
|
||||||
|
private String localPatternChars;
|
||||||
|
private String[] months;
|
||||||
|
private String[] shortMonths;
|
||||||
|
private String[] weekdays;
|
||||||
|
private String[] shortWeekdays;
|
||||||
|
private String[] dateFormats;
|
||||||
|
private String[] timeFormats;
|
||||||
|
private String[][] runtimeZoneStrings;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Construct a new instance with the parsed data.
|
||||||
|
*
|
||||||
|
* @param ampms strings for "am" and "pm".
|
||||||
|
* @param eras strings for calendar eras.
|
||||||
|
* @param localPatternChars localised pattern characters.
|
||||||
|
* @param months strings for the months of the year.
|
||||||
|
* @param shortMonths short strings for the months of the year.
|
||||||
|
* @param weekdays strings for the days of the week.
|
||||||
|
* @param shortWeekdays short strings for the days of the week.
|
||||||
|
* @param dateFormats localised date formats.
|
||||||
|
* @param timeFormats localised time formats.
|
||||||
|
* @param runtimeZoneStrings localised time zone names.
|
||||||
|
*/
|
||||||
|
public DFSData(String[] ampms, String[] eras, String localPatternChars,
|
||||||
|
String[] months, String[] shortMonths, String[] weekdays,
|
||||||
|
String[] shortWeekdays, String[] dateFormats,
|
||||||
|
String[] timeFormats, String[][] runtimeZoneStrings)
|
||||||
|
{
|
||||||
|
this.ampms = ampms;
|
||||||
|
this.eras = eras;
|
||||||
|
this.localPatternChars = localPatternChars;
|
||||||
|
this.months = months;
|
||||||
|
this.shortMonths = shortMonths;
|
||||||
|
this.weekdays = weekdays;
|
||||||
|
this.shortWeekdays = shortWeekdays;
|
||||||
|
this.dateFormats = dateFormats;
|
||||||
|
this.timeFormats = timeFormats;
|
||||||
|
this.runtimeZoneStrings = runtimeZoneStrings;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Accessor for the AM/PM data.
|
||||||
|
*
|
||||||
|
* @return the AM/PM strings.
|
||||||
|
*/
|
||||||
|
public String[] getAMPMs()
|
||||||
|
{
|
||||||
|
return ampms.clone();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Accessor for the era data.
|
||||||
|
*
|
||||||
|
* @return the era strings.
|
||||||
|
*/
|
||||||
|
public String[] getEras()
|
||||||
|
{
|
||||||
|
return eras.clone();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Accessor for the local pattern characters.
|
||||||
|
*
|
||||||
|
* @return the local pattern characters.
|
||||||
|
*/
|
||||||
|
public String getLocalPatternChars()
|
||||||
|
{
|
||||||
|
return localPatternChars;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Accessor for the months of the year (long form).
|
||||||
|
*
|
||||||
|
* @return the months of the year (long form).
|
||||||
|
*/
|
||||||
|
public String[] getMonths()
|
||||||
|
{
|
||||||
|
return months.clone();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Accessor for the months of the year (short form).
|
||||||
|
*
|
||||||
|
* @return the months of the year (short form).
|
||||||
|
*/
|
||||||
|
public String[] getShortMonths()
|
||||||
|
{
|
||||||
|
return shortMonths.clone();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Accessor for the days of the week (long form).
|
||||||
|
*
|
||||||
|
* @return the days of the week (long form).
|
||||||
|
*/
|
||||||
|
public String[] getWeekdays()
|
||||||
|
{
|
||||||
|
return weekdays.clone();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Accessor for the days of the week (short form).
|
||||||
|
*
|
||||||
|
* @return the days of the week (short form).
|
||||||
|
*/
|
||||||
|
public String[] getShortWeekdays()
|
||||||
|
{
|
||||||
|
return shortWeekdays.clone();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Accessor for the date formats.
|
||||||
|
*
|
||||||
|
* @return the date formats.
|
||||||
|
*/
|
||||||
|
public String[] getDateFormats()
|
||||||
|
{
|
||||||
|
return dateFormats.clone();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Accessor for the time formats.
|
||||||
|
*
|
||||||
|
* @return the time formats.
|
||||||
|
*/
|
||||||
|
public String[] getTimeFormats()
|
||||||
|
{
|
||||||
|
return timeFormats.clone();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Accessor for the zone strings.
|
||||||
|
*
|
||||||
|
* @return the zone strings.
|
||||||
|
*/
|
||||||
|
public String[][] getZoneStrings()
|
||||||
|
{
|
||||||
|
// Perform a deep clone so subarrays aren't modifiable
|
||||||
|
String[][] clone = runtimeZoneStrings.clone();
|
||||||
|
for (int a = 0; a < clone.length; ++a)
|
||||||
|
clone[a] = runtimeZoneStrings[a].clone();
|
||||||
|
return clone;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final ConcurrentMap<Locale, DFSData> dataCache = new ConcurrentHashMap<Locale, DFSData>();
|
||||||
|
|
||||||
|
String[] ampms;
|
||||||
|
String[] eras;
|
||||||
|
private String localPatternChars;
|
||||||
|
String[] months;
|
||||||
|
String[] shortMonths;
|
||||||
|
String[] shortWeekdays;
|
||||||
|
String[] weekdays;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The timezone strings supplied by the runtime.
|
* The timezone strings supplied by the runtime.
|
||||||
*/
|
*/
|
||||||
|
@ -161,7 +325,7 @@ public class DateFormatSymbols implements java.io.Serializable, Cloneable
|
||||||
for (int a = 0; a < bundles.size(); ++a)
|
for (int a = 0; a < bundles.size(); ++a)
|
||||||
{
|
{
|
||||||
String localeData = bundles.get(a).getString(name);
|
String localeData = bundles.get(a).getString(name);
|
||||||
String[] array = localeData.split("\u00ae", size);
|
String[] array = FIELD_SEP.split(localeData, size);
|
||||||
for (int b = 0; b < data.length; ++b)
|
for (int b = 0; b < data.length; ++b)
|
||||||
{
|
{
|
||||||
if (array.length > b && array[b] != null && data[b].isEmpty() && !array[b].isEmpty())
|
if (array.length > b && array[b] != null && data[b].isEmpty() && !array[b].isEmpty())
|
||||||
|
@ -180,21 +344,20 @@ public class DateFormatSymbols implements java.io.Serializable, Cloneable
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String[][] getZoneStrings(ResourceBundle res, Locale locale)
|
private static String[][] getZoneStrings(List<ResourceBundle> bundles, Locale locale)
|
||||||
{
|
{
|
||||||
List<String[]> allZones = new ArrayList<String[]>();
|
List<String[]> allZones = new ArrayList<String[]>();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Map<String,String[]> systemZones = new HashMap<String,String[]>();
|
Map<String,String[]> systemZones = new HashMap<String,String[]>();
|
||||||
while (true)
|
for (ResourceBundle bundle : bundles)
|
||||||
{
|
{
|
||||||
int index = 0;
|
|
||||||
String country = locale.getCountry();
|
String country = locale.getCountry();
|
||||||
String data = res.getString("zoneStrings");
|
String data = bundle.getString("zoneStrings");
|
||||||
String[] zones = data.split("\u00a9");
|
String[] zones = ZONE_SEP.split(data);
|
||||||
for (int a = 0; a < zones.length; ++a)
|
for (int a = 0; a < zones.length; ++a)
|
||||||
{
|
{
|
||||||
String[] strings = zones[a].split("\u00ae");
|
String[] strings = FIELD_SEP.split(zones[a]);
|
||||||
String type = properties.getProperty(strings[0] + "." + country);
|
String type = properties.getProperty(strings[0] + "." + country);
|
||||||
if (type == null)
|
if (type == null)
|
||||||
type = properties.getProperty(strings[0] + ".DEFAULT");
|
type = properties.getProperty(strings[0] + ".DEFAULT");
|
||||||
|
@ -217,12 +380,6 @@ public class DateFormatSymbols implements java.io.Serializable, Cloneable
|
||||||
}
|
}
|
||||||
systemZones.put(strings[0], strings);
|
systemZones.put(strings[0], strings);
|
||||||
}
|
}
|
||||||
if (res.getLocale() == Locale.ROOT)
|
|
||||||
break;
|
|
||||||
else
|
|
||||||
res = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation",
|
|
||||||
LocaleHelper.getFallbackLocale(res.getLocale()),
|
|
||||||
ClassLoader.getSystemClassLoader());
|
|
||||||
}
|
}
|
||||||
/* Final sanity check for missing values */
|
/* Final sanity check for missing values */
|
||||||
for (String[] zstrings : systemZones.values())
|
for (String[] zstrings : systemZones.values())
|
||||||
|
@ -288,16 +445,94 @@ public class DateFormatSymbols implements java.io.Serializable, Cloneable
|
||||||
return allZones.toArray(new String[allZones.size()][]);
|
return allZones.toArray(new String[allZones.size()][]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String[] formatsForKey(ResourceBundle res, String key)
|
/**
|
||||||
|
* Retrieve the date or time formats for a specific key e.g.
|
||||||
|
* asking for "DateFormat" will return an array containing the
|
||||||
|
* full, long, medium and short date formats localised for
|
||||||
|
* the locales in the specified bundle.
|
||||||
|
*
|
||||||
|
* @param bundles the stack of bundles to check, most-specific first.
|
||||||
|
* @param key the type of format to retrieve.
|
||||||
|
* @param an array of localised strings for each format prefix.
|
||||||
|
*/
|
||||||
|
private static String[] formatsForKey(List<ResourceBundle> bundles, String key)
|
||||||
{
|
{
|
||||||
String[] values = new String[formatPrefixes.length];
|
String[] values = new String[formatPrefixes.length];
|
||||||
|
|
||||||
for (int i = 0; i < formatPrefixes.length; i++)
|
for (int i = 0; i < formatPrefixes.length; i++)
|
||||||
values[i] = res.getString(formatPrefixes[i] + key);
|
values[i] = getString(bundles, formatPrefixes[i] + key);
|
||||||
|
|
||||||
return values;
|
return values;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Simple wrapper around extracting a {@code String} from a
|
||||||
|
* {@code ResourceBundle}. Keep searching less-specific locales
|
||||||
|
* until a non-null non-empty value is found.
|
||||||
|
*
|
||||||
|
* @param bundles the stack of bundles to check, most-specific first.
|
||||||
|
* @param key the key of the value to retrieve.
|
||||||
|
* @return the first non-null non-empty String found or the last
|
||||||
|
* retrieved if one isn't found.
|
||||||
|
*/
|
||||||
|
private static String getString(List<ResourceBundle> bundles, String key)
|
||||||
|
{
|
||||||
|
String val = null;
|
||||||
|
for (ResourceBundle bundle : bundles)
|
||||||
|
{
|
||||||
|
val = bundle.getString(key);
|
||||||
|
if (val != null && !val.isEmpty())
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the locale data from the property files and constructs a
|
||||||
|
* {@code DFSData} instance for it.
|
||||||
|
*
|
||||||
|
* @param the locale for which data should be retrieved.
|
||||||
|
* @return the parsed data.
|
||||||
|
* @throws MissingResourceException if the resources for the specified
|
||||||
|
* locale could not be found or loaded.
|
||||||
|
*/
|
||||||
|
private static DFSData retrieveData(Locale locale)
|
||||||
|
throws MissingResourceException
|
||||||
|
{
|
||||||
|
DFSData data = dataCache.get(locale);
|
||||||
|
if (data == null)
|
||||||
|
{
|
||||||
|
ClassLoader ldr = ClassLoader.getSystemClassLoader();
|
||||||
|
List<ResourceBundle> bundles = new ArrayList<ResourceBundle>();
|
||||||
|
ResourceBundle res
|
||||||
|
= ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", locale, ldr);
|
||||||
|
bundles.add(res);
|
||||||
|
Locale resLocale = res.getLocale();
|
||||||
|
while (resLocale != Locale.ROOT)
|
||||||
|
{
|
||||||
|
res = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation",
|
||||||
|
LocaleHelper.getFallbackLocale(resLocale), ldr);
|
||||||
|
bundles.add(res);
|
||||||
|
resLocale = res.getLocale();
|
||||||
|
}
|
||||||
|
String[] lMonths = getStringArray(bundles, "months", 13);
|
||||||
|
String[] lWeekdays = getStringArray(bundles, "weekdays", 8);
|
||||||
|
data = new DFSData(getStringArray(bundles, "ampms", 2),
|
||||||
|
getStringArray(bundles, "eras", 2),
|
||||||
|
getString(bundles, "localPatternChars"),
|
||||||
|
lMonths, getStringArray(bundles, "shortMonths", 13, lMonths),
|
||||||
|
lWeekdays, getStringArray(bundles, "shortWeekdays", 8, lWeekdays),
|
||||||
|
formatsForKey(bundles, "DateFormat"),
|
||||||
|
formatsForKey(bundles, "TimeFormat"),
|
||||||
|
getZoneStrings(bundles, locale));
|
||||||
|
DFSData cachedData = dataCache.putIfAbsent(locale, data);
|
||||||
|
// Use the earlier version if another thread beat us to it.
|
||||||
|
if (cachedData != null)
|
||||||
|
data = cachedData;
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method initializes a new instance of <code>DateFormatSymbols</code>
|
* This method initializes a new instance of <code>DateFormatSymbols</code>
|
||||||
* by loading the date format information for the specified locale.
|
* by loading the date format information for the specified locale.
|
||||||
|
@ -314,29 +549,17 @@ public class DateFormatSymbols implements java.io.Serializable, Cloneable
|
||||||
public DateFormatSymbols (Locale locale)
|
public DateFormatSymbols (Locale locale)
|
||||||
throws MissingResourceException
|
throws MissingResourceException
|
||||||
{
|
{
|
||||||
ClassLoader ldr = ClassLoader.getSystemClassLoader();
|
DFSData data = retrieveData(locale);
|
||||||
List<ResourceBundle> bundles = new ArrayList<ResourceBundle>();
|
ampms = data.getAMPMs();
|
||||||
ResourceBundle res
|
eras = data.getEras();
|
||||||
= ResourceBundle.getBundle("gnu.java.locale.LocaleInformation", locale, ldr);
|
localPatternChars = data.getLocalPatternChars();
|
||||||
bundles.add(res);
|
months = data.getMonths();
|
||||||
Locale resLocale = res.getLocale();
|
shortMonths = data.getShortMonths();
|
||||||
while (resLocale != Locale.ROOT)
|
weekdays = data.getWeekdays();
|
||||||
{
|
shortWeekdays = data.getShortWeekdays();
|
||||||
res = ResourceBundle.getBundle("gnu.java.locale.LocaleInformation",
|
dateFormats = data.getDateFormats();
|
||||||
LocaleHelper.getFallbackLocale(resLocale), ldr);
|
timeFormats = data.getTimeFormats();
|
||||||
bundles.add(res);
|
runtimeZoneStrings = data.getZoneStrings();
|
||||||
resLocale = res.getLocale();
|
|
||||||
}
|
|
||||||
ampms = getStringArray(bundles, "ampms", 2);
|
|
||||||
eras = getStringArray(bundles, "eras", 2);
|
|
||||||
localPatternChars = res.getString("localPatternChars");
|
|
||||||
months = getStringArray(bundles, "months", 13);
|
|
||||||
shortMonths = getStringArray(bundles, "shortMonths", 13, months);
|
|
||||||
weekdays = getStringArray(bundles, "weekdays", 8);
|
|
||||||
shortWeekdays = getStringArray(bundles, "shortWeekdays", 8, weekdays);
|
|
||||||
dateFormats = formatsForKey(res, "DateFormat");
|
|
||||||
timeFormats = formatsForKey(res, "TimeFormat");
|
|
||||||
runtimeZoneStrings = getZoneStrings(res, locale);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* DecimalFormat.java -- Formats and parses numbers
|
/* DecimalFormat.java -- Formats and parses numbers
|
||||||
Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
|
Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
@ -177,7 +177,7 @@ public class DecimalFormat extends NumberFormat
|
||||||
private boolean hasFractionalPattern;
|
private boolean hasFractionalPattern;
|
||||||
|
|
||||||
/** Stores a list of attributes for use by formatToCharacterIterator. */
|
/** Stores a list of attributes for use by formatToCharacterIterator. */
|
||||||
private ArrayList attributes = new ArrayList();
|
private ArrayList<FieldPosition> attributes = new ArrayList<FieldPosition>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs a <code>DecimalFormat</code> which uses the default
|
* Constructs a <code>DecimalFormat</code> which uses the default
|
||||||
|
@ -438,7 +438,7 @@ public class DecimalFormat extends NumberFormat
|
||||||
// add NumberFormat field attributes to the AttributedString
|
// add NumberFormat field attributes to the AttributedString
|
||||||
for (int i = 0; i < attributes.size(); i++)
|
for (int i = 0; i < attributes.size(); i++)
|
||||||
{
|
{
|
||||||
FieldPosition pos = (FieldPosition) attributes.get(i);
|
FieldPosition pos = attributes.get(i);
|
||||||
Format.Field attribute = pos.getFieldAttribute();
|
Format.Field attribute = pos.getFieldAttribute();
|
||||||
|
|
||||||
as.addAttribute(attribute, attribute, pos.getBeginIndex(),
|
as.addAttribute(attribute, attribute, pos.getBeginIndex(),
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* MessageFormat.java - Localized message formatting.
|
/* MessageFormat.java - Localized message formatting.
|
||||||
Copyright (C) 1999, 2001, 2002, 2004, 2005 Free Software Foundation, Inc.
|
Copyright (C) 1999, 2001, 2002, 2004, 2005, 2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
@ -164,7 +164,6 @@ public class MessageFormat extends Format
|
||||||
public static final MessageFormat.Field ARGUMENT = new MessageFormat.Field("argument");
|
public static final MessageFormat.Field ARGUMENT = new MessageFormat.Field("argument");
|
||||||
|
|
||||||
// For deserialization
|
// For deserialization
|
||||||
@SuppressWarnings("unused")
|
|
||||||
private Field()
|
private Field()
|
||||||
{
|
{
|
||||||
super("");
|
super("");
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* NumberFormat.java -- Formats and parses numbers
|
/* NumberFormat.java -- Formats and parses numbers
|
||||||
Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2007
|
Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2007, 2012
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
@ -177,7 +177,6 @@ public abstract class NumberFormat extends Format implements Cloneable
|
||||||
* This constructor is only used by the deserializer. Without it,
|
* This constructor is only used by the deserializer. Without it,
|
||||||
* it would fail to construct a valid object.
|
* it would fail to construct a valid object.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unused")
|
|
||||||
private Field()
|
private Field()
|
||||||
{
|
{
|
||||||
super("");
|
super("");
|
||||||
|
|
|
@ -120,10 +120,10 @@ public class Collections
|
||||||
* @return an empty parameterized set.
|
* @return an empty parameterized set.
|
||||||
* @since 1.5
|
* @since 1.5
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public static final <T> Set<T> emptySet()
|
public static final <T> Set<T> emptySet()
|
||||||
{
|
{
|
||||||
/* FIXME: Could this be optimized? */
|
return (Set<T>) EMPTY_SET;
|
||||||
return new EmptySet<T>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -161,6 +161,7 @@ public class Collections
|
||||||
* @return A non-iterating iterator.
|
* @return A non-iterating iterator.
|
||||||
*/
|
*/
|
||||||
// This is really cheating! I think it's perfectly valid, though.
|
// This is really cheating! I think it's perfectly valid, though.
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public Iterator<T> iterator()
|
public Iterator<T> iterator()
|
||||||
{
|
{
|
||||||
return (Iterator<T>) EMPTY_LIST.iterator();
|
return (Iterator<T>) EMPTY_LIST.iterator();
|
||||||
|
@ -196,7 +197,7 @@ public class Collections
|
||||||
*/
|
*/
|
||||||
public boolean equals(Object o)
|
public boolean equals(Object o)
|
||||||
{
|
{
|
||||||
return o instanceof Set && ((Set) o).isEmpty();
|
return o instanceof Set<?> && ((Set<?>) o).isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -288,10 +289,10 @@ public class Collections
|
||||||
* @return an empty parameterized list.
|
* @return an empty parameterized list.
|
||||||
* @since 1.5
|
* @since 1.5
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public static final <T> List<T> emptyList()
|
public static final <T> List<T> emptyList()
|
||||||
{
|
{
|
||||||
/* FIXME: Could this be optimized? */
|
return (List<T>) EMPTY_LIST;
|
||||||
return new EmptyList<T>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -369,7 +370,7 @@ public class Collections
|
||||||
*/
|
*/
|
||||||
public boolean equals(Object o)
|
public boolean equals(Object o)
|
||||||
{
|
{
|
||||||
return o instanceof List && ((List) o).isEmpty();
|
return o instanceof List<?> && ((List<?>) o).isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -480,10 +481,10 @@ public class Collections
|
||||||
* @return an empty parameterized map.
|
* @return an empty parameterized map.
|
||||||
* @since 1.5
|
* @since 1.5
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public static final <K,V> Map<K,V> emptyMap()
|
public static final <K,V> Map<K,V> emptyMap()
|
||||||
{
|
{
|
||||||
/* FIXME: Could this be optimized? */
|
return (Map<K,V>) EMPTY_MAP;
|
||||||
return new EmptyMap<K,V>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -511,9 +512,10 @@ public class Collections
|
||||||
* There are no entries.
|
* There are no entries.
|
||||||
* @return The empty set.
|
* @return The empty set.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public Set<Map.Entry<K, V>> entrySet()
|
public Set<Map.Entry<K, V>> entrySet()
|
||||||
{
|
{
|
||||||
return EMPTY_SET;
|
return (Set<Map.Entry<K, V>>) EMPTY_SET;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The remaining methods are optional, but provide a performance
|
// The remaining methods are optional, but provide a performance
|
||||||
|
@ -546,7 +548,7 @@ public class Collections
|
||||||
*/
|
*/
|
||||||
public boolean equals(Object o)
|
public boolean equals(Object o)
|
||||||
{
|
{
|
||||||
return o instanceof Map && ((Map) o).isEmpty();
|
return o instanceof Map<?,?> && ((Map<?,?>) o).isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -572,9 +574,10 @@ public class Collections
|
||||||
* No entries.
|
* No entries.
|
||||||
* @return The empty set.
|
* @return The empty set.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public Set<K> keySet()
|
public Set<K> keySet()
|
||||||
{
|
{
|
||||||
return EMPTY_SET;
|
return (Set<K>) EMPTY_SET;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -601,9 +604,10 @@ public class Collections
|
||||||
* Collection, will work. Besides, that's what the JDK uses!
|
* Collection, will work. Besides, that's what the JDK uses!
|
||||||
* @return The empty set.
|
* @return The empty set.
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public Collection<V> values()
|
public Collection<V> values()
|
||||||
{
|
{
|
||||||
return EMPTY_SET;
|
return (Collection<V>) EMPTY_SET;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1854,7 +1858,7 @@ public class Collections
|
||||||
public List<T> subList(int from, int to)
|
public List<T> subList(int from, int to)
|
||||||
{
|
{
|
||||||
if (from == to && (to == 0 || to == 1))
|
if (from == to && (to == 0 || to == 1))
|
||||||
return EMPTY_LIST;
|
return emptyList();
|
||||||
if (from == 0 && to == 1)
|
if (from == 0 && to == 1)
|
||||||
return this;
|
return this;
|
||||||
if (from > to)
|
if (from > to)
|
||||||
|
@ -2480,7 +2484,7 @@ public class Collections
|
||||||
* @throws ArrayStoreException if the type of any element of the
|
* @throws ArrayStoreException if the type of any element of the
|
||||||
* collection is not a subtype of the element type of a.
|
* collection is not a subtype of the element type of a.
|
||||||
*/
|
*/
|
||||||
public <T> T[] toArray(T[] a)
|
public <E> E[] toArray(E[] a)
|
||||||
{
|
{
|
||||||
synchronized (mutex)
|
synchronized (mutex)
|
||||||
{
|
{
|
||||||
|
|
|
@ -678,6 +678,12 @@ public final class Formatter
|
||||||
conversion);
|
conversion);
|
||||||
noPrecision(precision);
|
noPrecision(precision);
|
||||||
|
|
||||||
|
if (arg == null)
|
||||||
|
{
|
||||||
|
genericFormat("null", flags, width, precision);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
int theChar;
|
int theChar;
|
||||||
if (arg instanceof Character)
|
if (arg instanceof Character)
|
||||||
theChar = ((Character) arg).charValue();
|
theChar = ((Character) arg).charValue();
|
||||||
|
@ -748,6 +754,12 @@ public final class Formatter
|
||||||
int radix, char conversion)
|
int radix, char conversion)
|
||||||
{
|
{
|
||||||
assert radix == 8 || radix == 10 || radix == 16;
|
assert radix == 8 || radix == 10 || radix == 16;
|
||||||
|
|
||||||
|
if (arg == null)
|
||||||
|
{
|
||||||
|
return new CPStringBuilder("null");
|
||||||
|
}
|
||||||
|
|
||||||
noPrecision(precision);
|
noPrecision(precision);
|
||||||
|
|
||||||
// Some error checking.
|
// Some error checking.
|
||||||
|
@ -1353,9 +1365,12 @@ public final class Formatter
|
||||||
argumentIndex = previousArgumentIndex;
|
argumentIndex = previousArgumentIndex;
|
||||||
// Argument indices start at 1 but array indices at 0.
|
// Argument indices start at 1 but array indices at 0.
|
||||||
--argumentIndex;
|
--argumentIndex;
|
||||||
if (argumentIndex < 0 || argumentIndex >= args.length)
|
if (args != null)
|
||||||
throw new MissingFormatArgumentException(format.substring(start, index));
|
{
|
||||||
argument = args[argumentIndex];
|
if (argumentIndex < 0 || argumentIndex >= args.length)
|
||||||
|
throw new MissingFormatArgumentException(format.substring(start, index));
|
||||||
|
argument = args[argumentIndex];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (conversion)
|
switch (conversion)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* java.util.TimeZone
|
/* java.util.TimeZone
|
||||||
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007
|
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2012
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
@ -102,10 +102,10 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable
|
||||||
/* Look up default timezone */
|
/* Look up default timezone */
|
||||||
if (defaultZone0 == null)
|
if (defaultZone0 == null)
|
||||||
{
|
{
|
||||||
defaultZone0 = (TimeZone) AccessController.doPrivileged
|
defaultZone0 = AccessController.doPrivileged
|
||||||
(new PrivilegedAction()
|
(new PrivilegedAction<TimeZone>()
|
||||||
{
|
{
|
||||||
public Object run()
|
public TimeZone run()
|
||||||
{
|
{
|
||||||
TimeZone zone = null;
|
TimeZone zone = null;
|
||||||
|
|
||||||
|
@ -146,21 +146,21 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable
|
||||||
/**
|
/**
|
||||||
* JDK 1.1.x compatibility aliases.
|
* JDK 1.1.x compatibility aliases.
|
||||||
*/
|
*/
|
||||||
private static HashMap aliases0;
|
private static HashMap<String,String> aliases0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* HashMap for timezones by ID.
|
* HashMap for timezones by ID.
|
||||||
*/
|
*/
|
||||||
private static HashMap timezones0;
|
private static HashMap<String,TimeZone> timezones0;
|
||||||
/* initialize this static field lazily to overhead if
|
/* initialize this static field lazily to overhead if
|
||||||
* it is not needed:
|
* it is not needed:
|
||||||
*/
|
*/
|
||||||
// Package-private to avoid a trampoline.
|
// Package-private to avoid a trampoline.
|
||||||
static HashMap timezones()
|
static HashMap<String,TimeZone> timezones()
|
||||||
{
|
{
|
||||||
if (timezones0 == null)
|
if (timezones0 == null)
|
||||||
{
|
{
|
||||||
HashMap timezones = new HashMap();
|
HashMap<String,TimeZone> timezones = new HashMap<String,TimeZone>();
|
||||||
timezones0 = timezones;
|
timezones0 = timezones;
|
||||||
|
|
||||||
zoneinfo_dir = SystemProperties.getProperty("gnu.java.util.zoneinfo.dir");
|
zoneinfo_dir = SystemProperties.getProperty("gnu.java.util.zoneinfo.dir");
|
||||||
|
@ -169,7 +169,7 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable
|
||||||
|
|
||||||
if (zoneinfo_dir != null)
|
if (zoneinfo_dir != null)
|
||||||
{
|
{
|
||||||
aliases0 = new HashMap();
|
aliases0 = new HashMap<String,String>();
|
||||||
|
|
||||||
// These deprecated aliases for JDK 1.1.x compatibility
|
// These deprecated aliases for JDK 1.1.x compatibility
|
||||||
// should take precedence over data files read from
|
// should take precedence over data files read from
|
||||||
|
@ -1469,7 +1469,7 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable
|
||||||
{
|
{
|
||||||
synchronized (TimeZone.class)
|
synchronized (TimeZone.class)
|
||||||
{
|
{
|
||||||
tz = (TimeZone) timezones().get(ID);
|
tz = timezones().get(ID);
|
||||||
if (tz != null)
|
if (tz != null)
|
||||||
{
|
{
|
||||||
if (!tz.getID().equals(ID))
|
if (!tz.getID().equals(ID))
|
||||||
|
@ -1497,7 +1497,7 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable
|
||||||
|
|
||||||
// aliases0 is never changing after first timezones(), so should
|
// aliases0 is never changing after first timezones(), so should
|
||||||
// be safe without synchronization.
|
// be safe without synchronization.
|
||||||
String zonename = (String) aliases0.get(ID);
|
String zonename = aliases0.get(ID);
|
||||||
if (zonename == null)
|
if (zonename == null)
|
||||||
zonename = ID;
|
zonename = ID;
|
||||||
|
|
||||||
|
@ -1605,17 +1605,17 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable
|
||||||
{
|
{
|
||||||
synchronized (TimeZone.class)
|
synchronized (TimeZone.class)
|
||||||
{
|
{
|
||||||
HashMap h = timezones();
|
HashMap<String,TimeZone> h = timezones();
|
||||||
int count = 0;
|
int count = 0;
|
||||||
if (zoneinfo_dir == null)
|
if (zoneinfo_dir == null)
|
||||||
{
|
{
|
||||||
Iterator iter = h.entrySet().iterator();
|
Iterator<Map.Entry<String,TimeZone>> iter = h.entrySet().iterator();
|
||||||
while (iter.hasNext())
|
while (iter.hasNext())
|
||||||
{
|
{
|
||||||
// Don't iterate the values, since we want to count
|
// Don't iterate the values, since we want to count
|
||||||
// doubled values (aliases)
|
// doubled values (aliases)
|
||||||
Map.Entry entry = (Map.Entry) iter.next();
|
Map.Entry<String,TimeZone> entry = iter.next();
|
||||||
if (((TimeZone) entry.getValue()).getRawOffset() == rawOffset)
|
if (entry.getValue().getRawOffset() == rawOffset)
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1624,8 +1624,8 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable
|
||||||
iter = h.entrySet().iterator();
|
iter = h.entrySet().iterator();
|
||||||
while (iter.hasNext())
|
while (iter.hasNext())
|
||||||
{
|
{
|
||||||
Map.Entry entry = (Map.Entry) iter.next();
|
Map.Entry<String,TimeZone> entry = iter.next();
|
||||||
if (((TimeZone) entry.getValue()).getRawOffset() == rawOffset)
|
if (entry.getValue().getRawOffset() == rawOffset)
|
||||||
ids[count++] = (String) entry.getKey();
|
ids[count++] = (String) entry.getKey();
|
||||||
}
|
}
|
||||||
return ids;
|
return ids;
|
||||||
|
@ -1651,7 +1651,7 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable
|
||||||
return ids;
|
return ids;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int getAvailableIDs(File d, String prefix, ArrayList list)
|
private static int getAvailableIDs(File d, String prefix, ArrayList<String[]> list)
|
||||||
{
|
{
|
||||||
String[] files = d.list();
|
String[] files = d.list();
|
||||||
int count = files.length;
|
int count = files.length;
|
||||||
|
@ -1691,9 +1691,9 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable
|
||||||
{
|
{
|
||||||
synchronized (TimeZone.class)
|
synchronized (TimeZone.class)
|
||||||
{
|
{
|
||||||
HashMap h = timezones();
|
HashMap<String,TimeZone> h = timezones();
|
||||||
if (zoneinfo_dir == null)
|
if (zoneinfo_dir == null)
|
||||||
return (String[]) h.keySet().toArray(new String[h.size()]);
|
return h.keySet().toArray(new String[h.size()]);
|
||||||
|
|
||||||
if (availableIDs != null)
|
if (availableIDs != null)
|
||||||
{
|
{
|
||||||
|
@ -1704,7 +1704,7 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable
|
||||||
}
|
}
|
||||||
|
|
||||||
File d = new File(zoneinfo_dir);
|
File d = new File(zoneinfo_dir);
|
||||||
ArrayList list = new ArrayList(30);
|
ArrayList<String[]> list = new ArrayList<String[]>(30);
|
||||||
int count = getAvailableIDs(d, "", list) + aliases0.size();
|
int count = getAvailableIDs(d, "", list) + aliases0.size();
|
||||||
availableIDs = new String[count];
|
availableIDs = new String[count];
|
||||||
String[] ids = new String[count];
|
String[] ids = new String[count];
|
||||||
|
@ -1712,7 +1712,7 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable
|
||||||
count = 0;
|
count = 0;
|
||||||
for (int i = 0; i < list.size(); i++)
|
for (int i = 0; i < list.size(); i++)
|
||||||
{
|
{
|
||||||
String[] s = (String[]) list.get(i);
|
String[] s = list.get(i);
|
||||||
for (int j = 0; j < s.length; j++)
|
for (int j = 0; j < s.length; j++)
|
||||||
if (s[j] != null)
|
if (s[j] != null)
|
||||||
{
|
{
|
||||||
|
@ -1721,12 +1721,12 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Iterator iter = aliases0.entrySet().iterator();
|
Iterator<Map.Entry<String,String>> iter = aliases0.entrySet().iterator();
|
||||||
while (iter.hasNext())
|
while (iter.hasNext())
|
||||||
{
|
{
|
||||||
Map.Entry entry = (Map.Entry) iter.next();
|
Map.Entry<String,String> entry = iter.next();
|
||||||
availableIDs[count] = (String) entry.getKey();
|
availableIDs[count] = entry.getKey();
|
||||||
ids[count++] = (String) entry.getKey();
|
ids[count++] = entry.getKey();
|
||||||
}
|
}
|
||||||
|
|
||||||
return ids;
|
return ids;
|
||||||
|
|
|
@ -102,6 +102,28 @@ public final class Matcher implements MatchResult
|
||||||
anchoringBounds = 0;
|
anchoringBounds = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Changes the pattern used by the {@link Matcher} to
|
||||||
|
* the one specified. Existing match information is lost,
|
||||||
|
* but the input and the matcher's position within it is
|
||||||
|
* retained.
|
||||||
|
*
|
||||||
|
* @param newPattern the new pattern to use.
|
||||||
|
* @return this matcher.
|
||||||
|
* @throws IllegalArgumentException if {@code newPattern} is
|
||||||
|
* {@code null}.
|
||||||
|
* @since 1.5
|
||||||
|
*/
|
||||||
|
public Matcher usePattern(Pattern newPattern)
|
||||||
|
{
|
||||||
|
if (newPattern == null)
|
||||||
|
throw new IllegalArgumentException("The new pattern was null.");
|
||||||
|
pattern = newPattern;
|
||||||
|
match = null;
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param sb The target string buffer
|
* @param sb The target string buffer
|
||||||
* @param replacement The replacement string
|
* @param replacement The replacement string
|
||||||
|
@ -620,7 +642,7 @@ public final class Matcher implements MatchResult
|
||||||
*
|
*
|
||||||
* @param s the string to literalize.
|
* @param s the string to literalize.
|
||||||
* @return the literalized string.
|
* @return the literalized string.
|
||||||
* @since 1.5
|
* @since 1.5
|
||||||
*/
|
*/
|
||||||
public static String quoteReplacement(String s)
|
public static String quoteReplacement(String s)
|
||||||
{
|
{
|
||||||
|
|
|
@ -63,7 +63,7 @@ public class ActivationDataFlavor extends DataFlavor
|
||||||
* flavor
|
* flavor
|
||||||
*/
|
*/
|
||||||
// Raw types enforced as part of spec.
|
// Raw types enforced as part of spec.
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("rawtypes")
|
||||||
public ActivationDataFlavor(Class representationClass, String mimeType,
|
public ActivationDataFlavor(Class representationClass, String mimeType,
|
||||||
String humanPresentableName)
|
String humanPresentableName)
|
||||||
{
|
{
|
||||||
|
@ -80,7 +80,7 @@ public class ActivationDataFlavor extends DataFlavor
|
||||||
* flavor
|
* flavor
|
||||||
*/
|
*/
|
||||||
// Raw types enforced as part of spec.
|
// Raw types enforced as part of spec.
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("rawtypes")
|
||||||
public ActivationDataFlavor(Class representationClass,
|
public ActivationDataFlavor(Class representationClass,
|
||||||
String humanPresentableName)
|
String humanPresentableName)
|
||||||
{
|
{
|
||||||
|
@ -110,7 +110,7 @@ public class ActivationDataFlavor extends DataFlavor
|
||||||
}
|
}
|
||||||
|
|
||||||
// Raw types enforced as part of spec.
|
// Raw types enforced as part of spec.
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("rawtypes")
|
||||||
public Class getRepresentationClass()
|
public Class getRepresentationClass()
|
||||||
{
|
{
|
||||||
return representationClass;
|
return representationClass;
|
||||||
|
|
|
@ -224,7 +224,7 @@ public class MimeTypeParameterList
|
||||||
* Returns an enumeration of all the parameter names.
|
* Returns an enumeration of all the parameter names.
|
||||||
*/
|
*/
|
||||||
// Raw type is forced by public spec.
|
// Raw type is forced by public spec.
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("rawtypes")
|
||||||
public synchronized Enumeration getNames()
|
public synchronized Enumeration getNames()
|
||||||
{
|
{
|
||||||
return new IteratorEnumeration(parameterNames.iterator());
|
return new IteratorEnumeration(parameterNames.iterator());
|
||||||
|
|
|
@ -78,7 +78,7 @@ import java.util.List;
|
||||||
* to load the class.
|
* to load the class.
|
||||||
*/
|
*/
|
||||||
// API issue with lack of <?> on Class
|
// API issue with lack of <?> on Class
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("rawtypes")
|
||||||
public static Class loadClass(String name)
|
public static Class loadClass(String name)
|
||||||
throws ClassNotFoundException
|
throws ClassNotFoundException
|
||||||
{
|
{
|
||||||
|
@ -127,7 +127,7 @@ import java.util.List;
|
||||||
* to load the class.
|
* to load the class.
|
||||||
*/
|
*/
|
||||||
// API issue with lack of <?> on Class
|
// API issue with lack of <?> on Class
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("rawtypes")
|
||||||
public static Class loadClassWithout(ClassLoader exclude, String name)
|
public static Class loadClassWithout(ClassLoader exclude, String name)
|
||||||
throws ClassNotFoundException
|
throws ClassNotFoundException
|
||||||
{
|
{
|
||||||
|
|
|
@ -76,7 +76,7 @@ public class MBeanConstructorInfo
|
||||||
* @param cons the constructor.
|
* @param cons the constructor.
|
||||||
*/
|
*/
|
||||||
// API issue with lack of <?> on Constructor
|
// API issue with lack of <?> on Constructor
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("rawtypes")
|
||||||
public MBeanConstructorInfo(String desc, Constructor cons)
|
public MBeanConstructorInfo(String desc, Constructor cons)
|
||||||
{
|
{
|
||||||
super(cons.getName(), desc);
|
super(cons.getName(), desc);
|
||||||
|
|
|
@ -152,7 +152,7 @@ public interface RMIConnection
|
||||||
* NotificationFilter,
|
* NotificationFilter,
|
||||||
* Object)
|
* Object)
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("rawtypes")
|
||||||
void addNotificationListener(ObjectName name, ObjectName listener,
|
void addNotificationListener(ObjectName name, ObjectName listener,
|
||||||
MarshalledObject filter, MarshalledObject passback,
|
MarshalledObject filter, MarshalledObject passback,
|
||||||
Subject delegationSubject)
|
Subject delegationSubject)
|
||||||
|
@ -224,7 +224,7 @@ public interface RMIConnection
|
||||||
* NotificationFilter,
|
* NotificationFilter,
|
||||||
* Object)
|
* Object)
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("rawtypes")
|
||||||
Integer[] addNotificationListeners(ObjectName[] names, MarshalledObject[] filters,
|
Integer[] addNotificationListeners(ObjectName[] names, MarshalledObject[] filters,
|
||||||
Subject[] delegationSubjects)
|
Subject[] delegationSubjects)
|
||||||
throws InstanceNotFoundException, IOException;
|
throws InstanceNotFoundException, IOException;
|
||||||
|
@ -298,7 +298,7 @@ public interface RMIConnection
|
||||||
* @throws IOException if an I/O error occurred in communicating with
|
* @throws IOException if an I/O error occurred in communicating with
|
||||||
* the bean server.
|
* the bean server.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("rawtypes")
|
||||||
ObjectInstance createMBean(String className, ObjectName name,
|
ObjectInstance createMBean(String className, ObjectName name,
|
||||||
MarshalledObject params, String[] sig,
|
MarshalledObject params, String[] sig,
|
||||||
Subject delegationSubject)
|
Subject delegationSubject)
|
||||||
|
@ -367,7 +367,7 @@ public interface RMIConnection
|
||||||
* @throws IOException if an I/O error occurred in communicating with
|
* @throws IOException if an I/O error occurred in communicating with
|
||||||
* the bean server.
|
* the bean server.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("rawtypes")
|
||||||
ObjectInstance createMBean(String className, ObjectName name,
|
ObjectInstance createMBean(String className, ObjectName name,
|
||||||
ObjectName loaderName, MarshalledObject params,
|
ObjectName loaderName, MarshalledObject params,
|
||||||
String[] sig, Subject delegationSubject)
|
String[] sig, Subject delegationSubject)
|
||||||
|
@ -767,7 +767,7 @@ public interface RMIConnection
|
||||||
* the bean server.
|
* the bean server.
|
||||||
* @see DynamicMBean#invoke(String, Object[], String[])
|
* @see DynamicMBean#invoke(String, Object[], String[])
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("rawtypes")
|
||||||
Object invoke(ObjectName bean, String name, MarshalledObject params,
|
Object invoke(ObjectName bean, String name, MarshalledObject params,
|
||||||
String[] sig, Subject delegationSubject)
|
String[] sig, Subject delegationSubject)
|
||||||
throws InstanceNotFoundException, MBeanException,
|
throws InstanceNotFoundException, MBeanException,
|
||||||
|
@ -871,7 +871,7 @@ public interface RMIConnection
|
||||||
* @throws SecurityException if the client or delegated subject (if any) does
|
* @throws SecurityException if the client or delegated subject (if any) does
|
||||||
* not have permission to invoke this operation.
|
* not have permission to invoke this operation.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("rawtypes")
|
||||||
Set<ObjectInstance> queryMBeans(ObjectName name, MarshalledObject query,
|
Set<ObjectInstance> queryMBeans(ObjectName name, MarshalledObject query,
|
||||||
Subject delegationSubject)
|
Subject delegationSubject)
|
||||||
throws IOException;
|
throws IOException;
|
||||||
|
@ -914,7 +914,7 @@ public interface RMIConnection
|
||||||
* @throws IOException if an I/O error occurred in communicating with
|
* @throws IOException if an I/O error occurred in communicating with
|
||||||
* the bean server.
|
* the bean server.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("rawtypes")
|
||||||
Set<ObjectName> queryNames(ObjectName name, MarshalledObject query,
|
Set<ObjectName> queryNames(ObjectName name, MarshalledObject query,
|
||||||
Subject delegationSubject)
|
Subject delegationSubject)
|
||||||
throws IOException;
|
throws IOException;
|
||||||
|
@ -960,7 +960,7 @@ public interface RMIConnection
|
||||||
* NotificationFilter,
|
* NotificationFilter,
|
||||||
* Object)
|
* Object)
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("rawtypes")
|
||||||
void removeNotificationListener(ObjectName name,
|
void removeNotificationListener(ObjectName name,
|
||||||
ObjectName listener,
|
ObjectName listener,
|
||||||
MarshalledObject filter,
|
MarshalledObject filter,
|
||||||
|
@ -1080,7 +1080,7 @@ public interface RMIConnection
|
||||||
* @see #getAttribute(ObjectName, String, Subject)
|
* @see #getAttribute(ObjectName, String, Subject)
|
||||||
* @see javax.management.DynamicMBean#setAttribute(Attribute)
|
* @see javax.management.DynamicMBean#setAttribute(Attribute)
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("rawtypes")
|
||||||
void setAttribute(ObjectName name, MarshalledObject attribute,
|
void setAttribute(ObjectName name, MarshalledObject attribute,
|
||||||
Subject delegationSubject)
|
Subject delegationSubject)
|
||||||
throws InstanceNotFoundException, AttributeNotFoundException,
|
throws InstanceNotFoundException, AttributeNotFoundException,
|
||||||
|
@ -1121,7 +1121,7 @@ public interface RMIConnection
|
||||||
* @see #getAttributes(ObjectName, String[])
|
* @see #getAttributes(ObjectName, String[])
|
||||||
* @see DynamicMBean#setAttributes(AttributeList)
|
* @see DynamicMBean#setAttributes(AttributeList)
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("rawtypes")
|
||||||
AttributeList setAttributes(ObjectName name, MarshalledObject attributes,
|
AttributeList setAttributes(ObjectName name, MarshalledObject attributes,
|
||||||
Subject delegationSubject)
|
Subject delegationSubject)
|
||||||
throws InstanceNotFoundException, ReflectionException,
|
throws InstanceNotFoundException, ReflectionException,
|
||||||
|
|
|
@ -265,6 +265,16 @@ public class Sasl
|
||||||
*/
|
*/
|
||||||
public static final String REUSE = "javax.security.sasl.reuse";
|
public static final String REUSE = "javax.security.sasl.reuse";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>The name of a property which specifies the credentials to use.
|
||||||
|
* The value of the property is a mechanism-specific object which can
|
||||||
|
* be used to supply credentials to a mechanism which provides delegated
|
||||||
|
* authentication.</p>
|
||||||
|
*
|
||||||
|
* <p>The value of this constant is <code>"javax.security.sasl.credentials"</code>.</p>
|
||||||
|
*/
|
||||||
|
public static final String CREDENTIALS = "javax.security.sasl.credentials";
|
||||||
|
|
||||||
private static final String CLIENT_FACTORY_SVC = "SaslClientFactory.";
|
private static final String CLIENT_FACTORY_SVC = "SaslClientFactory.";
|
||||||
private static final String SERVER_FACTORY_SVC = "SaslServerFactory.";
|
private static final String SERVER_FACTORY_SVC = "SaslServerFactory.";
|
||||||
private static final String ALIAS = "Alg.Alias.";
|
private static final String ALIAS = "Alg.Alias.";
|
||||||
|
|
|
@ -120,10 +120,12 @@ public class MetaMessage extends MidiMessage
|
||||||
|
|
||||||
// Now compute the length representation
|
// Now compute the length representation
|
||||||
long buffer = length & 0x7F;
|
long buffer = length & 0x7F;
|
||||||
while ((length >>= 7) > 0)
|
// Avoid altering length variable; PR42551
|
||||||
|
lengthValue = length;
|
||||||
|
while ((lengthValue >>= 7) > 0)
|
||||||
{
|
{
|
||||||
buffer <<= 8;
|
buffer <<= 8;
|
||||||
buffer |= ((length & 0x7F) | 0x80);
|
buffer |= ((lengthValue & 0x7F) | 0x80);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now store the variable length length value
|
// Now store the variable length length value
|
||||||
|
|
|
@ -46,6 +46,7 @@ package javax.sound.midi;
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public interface MidiDevice
|
public interface MidiDevice
|
||||||
|
extends AutoCloseable
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Get the Info object describing this device.
|
* Get the Info object describing this device.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* MidiSystem.java -- Access system MIDI resources
|
/* MidiSystem.java -- Access system MIDI resources
|
||||||
Copyright (C) 2005 Free Software Foundation, Inc.
|
Copyright (C) 2005, 2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
@ -76,9 +76,9 @@ public class MidiSystem
|
||||||
*/
|
*/
|
||||||
public static MidiDevice.Info[] getMidiDeviceInfo()
|
public static MidiDevice.Info[] getMidiDeviceInfo()
|
||||||
{
|
{
|
||||||
Iterator deviceProviders =
|
Iterator<MidiDeviceProvider> deviceProviders =
|
||||||
ServiceFactory.lookupProviders(MidiDeviceProvider.class);
|
ServiceFactory.lookupProviders(MidiDeviceProvider.class);
|
||||||
List infoList = new ArrayList();
|
List<MidiDevice.Info> infoList = new ArrayList<MidiDevice.Info>();
|
||||||
|
|
||||||
while (deviceProviders.hasNext())
|
while (deviceProviders.hasNext())
|
||||||
{
|
{
|
||||||
|
@ -88,8 +88,7 @@ public class MidiSystem
|
||||||
infoList.add(infos[--i]);
|
infoList.add(infos[--i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (MidiDevice.Info[])
|
return infoList.toArray(new MidiDevice.Info[infoList.size()]);
|
||||||
infoList.toArray(new MidiDevice.Info[infoList.size()]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -103,7 +102,7 @@ public class MidiSystem
|
||||||
public static MidiDevice getMidiDevice(MidiDevice.Info info)
|
public static MidiDevice getMidiDevice(MidiDevice.Info info)
|
||||||
throws MidiUnavailableException
|
throws MidiUnavailableException
|
||||||
{
|
{
|
||||||
Iterator deviceProviders =
|
Iterator<MidiDeviceProvider> deviceProviders =
|
||||||
ServiceFactory.lookupProviders(MidiDeviceProvider.class);
|
ServiceFactory.lookupProviders(MidiDeviceProvider.class);
|
||||||
|
|
||||||
if (! deviceProviders.hasNext())
|
if (! deviceProviders.hasNext())
|
||||||
|
@ -216,10 +215,11 @@ public class MidiSystem
|
||||||
public static Soundbank getSoundbank(InputStream stream)
|
public static Soundbank getSoundbank(InputStream stream)
|
||||||
throws InvalidMidiDataException, IOException
|
throws InvalidMidiDataException, IOException
|
||||||
{
|
{
|
||||||
Iterator readers = ServiceFactory.lookupProviders(SoundbankReader.class);
|
Iterator<SoundbankReader> readers =
|
||||||
|
ServiceFactory.lookupProviders(SoundbankReader.class);
|
||||||
while (readers.hasNext())
|
while (readers.hasNext())
|
||||||
{
|
{
|
||||||
SoundbankReader sr = (SoundbankReader) readers.next();
|
SoundbankReader sr = readers.next();
|
||||||
Soundbank sb = sr.getSoundbank(stream);
|
Soundbank sb = sr.getSoundbank(stream);
|
||||||
if (sb != null)
|
if (sb != null)
|
||||||
return sb;
|
return sb;
|
||||||
|
@ -238,10 +238,11 @@ public class MidiSystem
|
||||||
public static Soundbank getSoundbank(URL url)
|
public static Soundbank getSoundbank(URL url)
|
||||||
throws InvalidMidiDataException, IOException
|
throws InvalidMidiDataException, IOException
|
||||||
{
|
{
|
||||||
Iterator readers = ServiceFactory.lookupProviders(SoundbankReader.class);
|
Iterator<SoundbankReader> readers =
|
||||||
|
ServiceFactory.lookupProviders(SoundbankReader.class);
|
||||||
while (readers.hasNext())
|
while (readers.hasNext())
|
||||||
{
|
{
|
||||||
SoundbankReader sr = (SoundbankReader) readers.next();
|
SoundbankReader sr = readers.next();
|
||||||
Soundbank sb = sr.getSoundbank(url);
|
Soundbank sb = sr.getSoundbank(url);
|
||||||
if (sb != null)
|
if (sb != null)
|
||||||
return sb;
|
return sb;
|
||||||
|
@ -260,7 +261,8 @@ public class MidiSystem
|
||||||
public static Soundbank getSoundbank(File file)
|
public static Soundbank getSoundbank(File file)
|
||||||
throws InvalidMidiDataException, IOException
|
throws InvalidMidiDataException, IOException
|
||||||
{
|
{
|
||||||
Iterator readers = ServiceFactory.lookupProviders(SoundbankReader.class);
|
Iterator<SoundbankReader> readers =
|
||||||
|
ServiceFactory.lookupProviders(SoundbankReader.class);
|
||||||
while (readers.hasNext())
|
while (readers.hasNext())
|
||||||
{
|
{
|
||||||
SoundbankReader sr = (SoundbankReader) readers.next();
|
SoundbankReader sr = (SoundbankReader) readers.next();
|
||||||
|
@ -283,10 +285,11 @@ public class MidiSystem
|
||||||
public static MidiFileFormat getMidiFileFormat(InputStream stream)
|
public static MidiFileFormat getMidiFileFormat(InputStream stream)
|
||||||
throws InvalidMidiDataException, IOException
|
throws InvalidMidiDataException, IOException
|
||||||
{
|
{
|
||||||
Iterator readers = ServiceFactory.lookupProviders(MidiFileReader.class);
|
Iterator<MidiFileReader> readers =
|
||||||
|
ServiceFactory.lookupProviders(MidiFileReader.class);
|
||||||
while (readers.hasNext())
|
while (readers.hasNext())
|
||||||
{
|
{
|
||||||
MidiFileReader sr = (MidiFileReader) readers.next();
|
MidiFileReader sr = readers.next();
|
||||||
MidiFileFormat sb = sr.getMidiFileFormat(stream);
|
MidiFileFormat sb = sr.getMidiFileFormat(stream);
|
||||||
if (sb != null)
|
if (sb != null)
|
||||||
return sb;
|
return sb;
|
||||||
|
@ -305,10 +308,11 @@ public class MidiSystem
|
||||||
public static MidiFileFormat getMidiFileFormat(URL url)
|
public static MidiFileFormat getMidiFileFormat(URL url)
|
||||||
throws InvalidMidiDataException, IOException
|
throws InvalidMidiDataException, IOException
|
||||||
{
|
{
|
||||||
Iterator readers = ServiceFactory.lookupProviders(MidiFileReader.class);
|
Iterator<MidiFileReader> readers =
|
||||||
|
ServiceFactory.lookupProviders(MidiFileReader.class);
|
||||||
while (readers.hasNext())
|
while (readers.hasNext())
|
||||||
{
|
{
|
||||||
MidiFileReader sr = (MidiFileReader) readers.next();
|
MidiFileReader sr = readers.next();
|
||||||
MidiFileFormat sb = sr.getMidiFileFormat(url);
|
MidiFileFormat sb = sr.getMidiFileFormat(url);
|
||||||
if (sb != null)
|
if (sb != null)
|
||||||
return sb;
|
return sb;
|
||||||
|
@ -327,10 +331,11 @@ public class MidiSystem
|
||||||
public static MidiFileFormat getMidiFileFormat(File file)
|
public static MidiFileFormat getMidiFileFormat(File file)
|
||||||
throws InvalidMidiDataException, IOException
|
throws InvalidMidiDataException, IOException
|
||||||
{
|
{
|
||||||
Iterator readers = ServiceFactory.lookupProviders(MidiFileReader.class);
|
Iterator<MidiFileReader> readers =
|
||||||
|
ServiceFactory.lookupProviders(MidiFileReader.class);
|
||||||
while (readers.hasNext())
|
while (readers.hasNext())
|
||||||
{
|
{
|
||||||
MidiFileReader sr = (MidiFileReader) readers.next();
|
MidiFileReader sr = readers.next();
|
||||||
MidiFileFormat sb = sr.getMidiFileFormat(file);
|
MidiFileFormat sb = sr.getMidiFileFormat(file);
|
||||||
if (sb != null)
|
if (sb != null)
|
||||||
return sb;
|
return sb;
|
||||||
|
@ -350,10 +355,11 @@ public class MidiSystem
|
||||||
public static Sequence getSequence(InputStream stream)
|
public static Sequence getSequence(InputStream stream)
|
||||||
throws InvalidMidiDataException, IOException
|
throws InvalidMidiDataException, IOException
|
||||||
{
|
{
|
||||||
Iterator readers = ServiceFactory.lookupProviders(MidiFileReader.class);
|
Iterator<MidiFileReader> readers =
|
||||||
|
ServiceFactory.lookupProviders(MidiFileReader.class);
|
||||||
while (readers.hasNext())
|
while (readers.hasNext())
|
||||||
{
|
{
|
||||||
MidiFileReader sr = (MidiFileReader) readers.next();
|
MidiFileReader sr = readers.next();
|
||||||
Sequence sq = sr.getSequence(stream);
|
Sequence sq = sr.getSequence(stream);
|
||||||
if (sq != null)
|
if (sq != null)
|
||||||
return sq;
|
return sq;
|
||||||
|
@ -372,10 +378,11 @@ public class MidiSystem
|
||||||
public static Sequence getSequence(URL url)
|
public static Sequence getSequence(URL url)
|
||||||
throws InvalidMidiDataException, IOException
|
throws InvalidMidiDataException, IOException
|
||||||
{
|
{
|
||||||
Iterator readers = ServiceFactory.lookupProviders(MidiFileReader.class);
|
Iterator<MidiFileReader> readers =
|
||||||
|
ServiceFactory.lookupProviders(MidiFileReader.class);
|
||||||
while (readers.hasNext())
|
while (readers.hasNext())
|
||||||
{
|
{
|
||||||
MidiFileReader sr = (MidiFileReader) readers.next();
|
MidiFileReader sr = readers.next();
|
||||||
Sequence sq = sr.getSequence(url);
|
Sequence sq = sr.getSequence(url);
|
||||||
if (sq != null)
|
if (sq != null)
|
||||||
return sq;
|
return sq;
|
||||||
|
@ -394,10 +401,11 @@ public class MidiSystem
|
||||||
public static Sequence getSequence(File file)
|
public static Sequence getSequence(File file)
|
||||||
throws InvalidMidiDataException, IOException
|
throws InvalidMidiDataException, IOException
|
||||||
{
|
{
|
||||||
Iterator readers = ServiceFactory.lookupProviders(MidiFileReader.class);
|
Iterator<MidiFileReader> readers =
|
||||||
|
ServiceFactory.lookupProviders(MidiFileReader.class);
|
||||||
while (readers.hasNext())
|
while (readers.hasNext())
|
||||||
{
|
{
|
||||||
MidiFileReader sr = (MidiFileReader) readers.next();
|
MidiFileReader sr = readers.next();
|
||||||
Sequence sq = sr.getSequence(file);
|
Sequence sq = sr.getSequence(file);
|
||||||
if (sq != null)
|
if (sq != null)
|
||||||
return sq;
|
return sq;
|
||||||
|
@ -417,10 +425,11 @@ public class MidiSystem
|
||||||
boolean supported[] = new boolean[3];
|
boolean supported[] = new boolean[3];
|
||||||
// The number of supported formats.
|
// The number of supported formats.
|
||||||
int count = 0;
|
int count = 0;
|
||||||
Iterator writers = ServiceFactory.lookupProviders(MidiFileWriter.class);
|
Iterator<MidiFileWriter> writers =
|
||||||
|
ServiceFactory.lookupProviders(MidiFileWriter.class);
|
||||||
while (writers.hasNext())
|
while (writers.hasNext())
|
||||||
{
|
{
|
||||||
MidiFileWriter fw = (MidiFileWriter) writers.next();
|
MidiFileWriter fw = writers.next();
|
||||||
int types[] = fw.getMidiFileTypes();
|
int types[] = fw.getMidiFileTypes();
|
||||||
for (int i = types.length; i > 0;)
|
for (int i = types.length; i > 0;)
|
||||||
{
|
{
|
||||||
|
@ -449,10 +458,10 @@ public class MidiSystem
|
||||||
*/
|
*/
|
||||||
public static boolean isFileTypeSupported(int fileType)
|
public static boolean isFileTypeSupported(int fileType)
|
||||||
{
|
{
|
||||||
Iterator writers = ServiceFactory.lookupProviders(MidiFileWriter.class);
|
Iterator<MidiFileWriter> writers = ServiceFactory.lookupProviders(MidiFileWriter.class);
|
||||||
while (writers.hasNext())
|
while (writers.hasNext())
|
||||||
{
|
{
|
||||||
MidiFileWriter fw = (MidiFileWriter) writers.next();
|
MidiFileWriter fw = writers.next();
|
||||||
|
|
||||||
if (fw.isFileTypeSupported(fileType))
|
if (fw.isFileTypeSupported(fileType))
|
||||||
return true;
|
return true;
|
||||||
|
@ -473,7 +482,7 @@ public class MidiSystem
|
||||||
boolean supported[] = new boolean[3];
|
boolean supported[] = new boolean[3];
|
||||||
// The number of supported formats.
|
// The number of supported formats.
|
||||||
int count = 0;
|
int count = 0;
|
||||||
Iterator writers = ServiceFactory.lookupProviders(MidiFileWriter.class);
|
Iterator<MidiFileWriter> writers = ServiceFactory.lookupProviders(MidiFileWriter.class);
|
||||||
while (writers.hasNext())
|
while (writers.hasNext())
|
||||||
{
|
{
|
||||||
MidiFileWriter fw = (MidiFileWriter) writers.next();
|
MidiFileWriter fw = (MidiFileWriter) writers.next();
|
||||||
|
@ -507,7 +516,7 @@ public class MidiSystem
|
||||||
*/
|
*/
|
||||||
public static boolean isFileTypeSupported(int fileType, Sequence sequence)
|
public static boolean isFileTypeSupported(int fileType, Sequence sequence)
|
||||||
{
|
{
|
||||||
Iterator writers = ServiceFactory.lookupProviders(MidiFileWriter.class);
|
Iterator<MidiFileWriter> writers = ServiceFactory.lookupProviders(MidiFileWriter.class);
|
||||||
while (writers.hasNext())
|
while (writers.hasNext())
|
||||||
{
|
{
|
||||||
MidiFileWriter fw = (MidiFileWriter) writers.next();
|
MidiFileWriter fw = (MidiFileWriter) writers.next();
|
||||||
|
@ -531,7 +540,7 @@ public class MidiSystem
|
||||||
public static int write(Sequence in, int fileType, OutputStream out)
|
public static int write(Sequence in, int fileType, OutputStream out)
|
||||||
throws IOException
|
throws IOException
|
||||||
{
|
{
|
||||||
Iterator writers = ServiceFactory.lookupProviders(MidiFileWriter.class);
|
Iterator<MidiFileWriter> writers = ServiceFactory.lookupProviders(MidiFileWriter.class);
|
||||||
while (writers.hasNext())
|
while (writers.hasNext())
|
||||||
{
|
{
|
||||||
MidiFileWriter fw = (MidiFileWriter) writers.next();
|
MidiFileWriter fw = (MidiFileWriter) writers.next();
|
||||||
|
@ -556,7 +565,7 @@ public class MidiSystem
|
||||||
public static int write(Sequence in, int fileType, File out)
|
public static int write(Sequence in, int fileType, File out)
|
||||||
throws IOException
|
throws IOException
|
||||||
{
|
{
|
||||||
Iterator writers = ServiceFactory.lookupProviders(MidiFileWriter.class);
|
Iterator<MidiFileWriter> writers = ServiceFactory.lookupProviders(MidiFileWriter.class);
|
||||||
while (writers.hasNext())
|
while (writers.hasNext())
|
||||||
{
|
{
|
||||||
MidiFileWriter fw = (MidiFileWriter) writers.next();
|
MidiFileWriter fw = (MidiFileWriter) writers.next();
|
||||||
|
|
|
@ -47,6 +47,7 @@ package javax.sound.midi;
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public interface Receiver
|
public interface Receiver
|
||||||
|
extends AutoCloseable
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Send a MIDI message and timestamp. Some receivers don't support
|
* Send a MIDI message and timestamp. Some receivers don't support
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* SoundbankResource.java -- An audio resource from a sound bank
|
/* SoundbankResource.java -- An audio resource from a sound bank
|
||||||
Copyright (C) 2005 Free Software Foundation, Inc.
|
Copyright (C) 2005, 2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ public abstract class SoundbankResource
|
||||||
{
|
{
|
||||||
private final Soundbank soundbank;
|
private final Soundbank soundbank;
|
||||||
private final String name;
|
private final String name;
|
||||||
private final Class dataClass;
|
private final Class<?> dataClass;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a SoundbankResource object.
|
* Create a SoundbankResource object.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Track.java -- A track of MIDI events
|
/* Track.java -- A track of MIDI events
|
||||||
Copyright (C) 2005 Free Software Foundation, Inc.
|
Copyright (C) 2005, 2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
@ -54,10 +54,10 @@ public class Track
|
||||||
/**
|
/**
|
||||||
* The list of MidiEvents for this track.
|
* The list of MidiEvents for this track.
|
||||||
*/
|
*/
|
||||||
Vector events = new Vector();
|
Vector<MidiEvent> events = new Vector<MidiEvent>();
|
||||||
|
|
||||||
// A HashSet to speed processing
|
// A HashSet to speed processing
|
||||||
private HashSet eventSet = new HashSet();
|
private HashSet<MidiEvent> eventSet = new HashSet<MidiEvent>();
|
||||||
|
|
||||||
// This is only instantiable within this package.
|
// This is only instantiable within this package.
|
||||||
Track()
|
Track()
|
||||||
|
@ -83,7 +83,7 @@ public class Track
|
||||||
|
|
||||||
long targetTick = event.getTick();
|
long targetTick = event.getTick();
|
||||||
int i = events.size() - 1;
|
int i = events.size() - 1;
|
||||||
while (i >= 0 && (((MidiEvent)events.get(i)).getTick() > targetTick))
|
while (i >= 0 && (events.get(i).getTick() > targetTick))
|
||||||
i--;
|
i--;
|
||||||
events.add(i+1, event);
|
events.add(i+1, event);
|
||||||
return true;
|
return true;
|
||||||
|
@ -127,7 +127,7 @@ public class Track
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return (MidiEvent) events.get(index);
|
return events.get(index);
|
||||||
}
|
}
|
||||||
catch (IndexOutOfBoundsException e)
|
catch (IndexOutOfBoundsException e)
|
||||||
{
|
{
|
||||||
|
@ -158,7 +158,7 @@ public class Track
|
||||||
synchronized (events)
|
synchronized (events)
|
||||||
{
|
{
|
||||||
int size = events.size();
|
int size = events.size();
|
||||||
return ((MidiEvent) events.get(size - 1)).getTick();
|
return events.get(size - 1).getTick();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,6 +47,7 @@ package javax.sound.midi;
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public interface Transmitter
|
public interface Transmitter
|
||||||
|
extends AutoCloseable
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Set the Receiver to which MIDI events will be sent.
|
* Set the Receiver to which MIDI events will be sent.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Main interface to audio system
|
/* Main interface to audio system
|
||||||
Copyright (C) 2005 Free Software Foundation, Inc.
|
Copyright (C) 2005, 2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
@ -84,10 +84,10 @@ public class AudioSystem
|
||||||
public static AudioFileFormat getAudioFileFormat(File f)
|
public static AudioFileFormat getAudioFileFormat(File f)
|
||||||
throws UnsupportedAudioFileException, IOException
|
throws UnsupportedAudioFileException, IOException
|
||||||
{
|
{
|
||||||
Iterator i = ServiceFactory.lookupProviders(AudioFileReader.class);
|
Iterator<AudioFileReader> i = ServiceFactory.lookupProviders(AudioFileReader.class);
|
||||||
while (i.hasNext())
|
while (i.hasNext())
|
||||||
{
|
{
|
||||||
AudioFileReader reader = (AudioFileReader) i.next();
|
AudioFileReader reader = i.next();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return reader.getAudioFileFormat(f);
|
return reader.getAudioFileFormat(f);
|
||||||
|
@ -111,10 +111,10 @@ public class AudioSystem
|
||||||
public static AudioFileFormat getAudioFileFormat(InputStream is)
|
public static AudioFileFormat getAudioFileFormat(InputStream is)
|
||||||
throws UnsupportedAudioFileException, IOException
|
throws UnsupportedAudioFileException, IOException
|
||||||
{
|
{
|
||||||
Iterator i = ServiceFactory.lookupProviders(AudioFileReader.class);
|
Iterator<AudioFileReader> i = ServiceFactory.lookupProviders(AudioFileReader.class);
|
||||||
while (i.hasNext())
|
while (i.hasNext())
|
||||||
{
|
{
|
||||||
AudioFileReader reader = (AudioFileReader) i.next();
|
AudioFileReader reader = i.next();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return reader.getAudioFileFormat(is);
|
return reader.getAudioFileFormat(is);
|
||||||
|
@ -138,10 +138,10 @@ public class AudioSystem
|
||||||
public static AudioFileFormat getAudioFileFormat(URL url)
|
public static AudioFileFormat getAudioFileFormat(URL url)
|
||||||
throws UnsupportedAudioFileException, IOException
|
throws UnsupportedAudioFileException, IOException
|
||||||
{
|
{
|
||||||
Iterator i = ServiceFactory.lookupProviders(AudioFileReader.class);
|
Iterator<AudioFileReader> i = ServiceFactory.lookupProviders(AudioFileReader.class);
|
||||||
while (i.hasNext())
|
while (i.hasNext())
|
||||||
{
|
{
|
||||||
AudioFileReader reader = (AudioFileReader) i.next();
|
AudioFileReader reader = i.next();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return reader.getAudioFileFormat(url);
|
return reader.getAudioFileFormat(url);
|
||||||
|
@ -162,10 +162,10 @@ public class AudioSystem
|
||||||
{
|
{
|
||||||
HashSet<AudioFileFormat.Type> result
|
HashSet<AudioFileFormat.Type> result
|
||||||
= new HashSet<AudioFileFormat.Type>();
|
= new HashSet<AudioFileFormat.Type>();
|
||||||
Iterator i = ServiceFactory.lookupProviders(AudioFileWriter.class);
|
Iterator<AudioFileWriter> i = ServiceFactory.lookupProviders(AudioFileWriter.class);
|
||||||
while (i.hasNext())
|
while (i.hasNext())
|
||||||
{
|
{
|
||||||
AudioFileWriter writer = (AudioFileWriter) i.next();
|
AudioFileWriter writer = i.next();
|
||||||
AudioFileFormat.Type[] types = writer.getAudioFileTypes();
|
AudioFileFormat.Type[] types = writer.getAudioFileTypes();
|
||||||
for (int j = 0; j < types.length; ++j)
|
for (int j = 0; j < types.length; ++j)
|
||||||
result.add(types[j]);
|
result.add(types[j]);
|
||||||
|
@ -183,10 +183,10 @@ public class AudioSystem
|
||||||
{
|
{
|
||||||
HashSet<AudioFileFormat.Type> result
|
HashSet<AudioFileFormat.Type> result
|
||||||
= new HashSet<AudioFileFormat.Type>();
|
= new HashSet<AudioFileFormat.Type>();
|
||||||
Iterator i = ServiceFactory.lookupProviders(AudioFileWriter.class);
|
Iterator<AudioFileWriter> i = ServiceFactory.lookupProviders(AudioFileWriter.class);
|
||||||
while (i.hasNext())
|
while (i.hasNext())
|
||||||
{
|
{
|
||||||
AudioFileWriter writer = (AudioFileWriter) i.next();
|
AudioFileWriter writer = i.next();
|
||||||
AudioFileFormat.Type[] types = writer.getAudioFileTypes(ais);
|
AudioFileFormat.Type[] types = writer.getAudioFileTypes(ais);
|
||||||
for (int j = 0; j < types.length; ++j)
|
for (int j = 0; j < types.length; ++j)
|
||||||
result.add(types[j]);
|
result.add(types[j]);
|
||||||
|
@ -206,10 +206,11 @@ public class AudioSystem
|
||||||
public static AudioInputStream getAudioInputStream(AudioFormat.Encoding targ,
|
public static AudioInputStream getAudioInputStream(AudioFormat.Encoding targ,
|
||||||
AudioInputStream ais)
|
AudioInputStream ais)
|
||||||
{
|
{
|
||||||
Iterator i = ServiceFactory.lookupProviders(FormatConversionProvider.class);
|
Iterator<FormatConversionProvider> i =
|
||||||
|
ServiceFactory.lookupProviders(FormatConversionProvider.class);
|
||||||
while (i.hasNext())
|
while (i.hasNext())
|
||||||
{
|
{
|
||||||
FormatConversionProvider prov = (FormatConversionProvider) i.next();
|
FormatConversionProvider prov = i.next();
|
||||||
if (! prov.isConversionSupported(targ, ais.getFormat()))
|
if (! prov.isConversionSupported(targ, ais.getFormat()))
|
||||||
continue;
|
continue;
|
||||||
return prov.getAudioInputStream(targ, ais);
|
return prov.getAudioInputStream(targ, ais);
|
||||||
|
@ -229,10 +230,11 @@ public class AudioSystem
|
||||||
public static AudioInputStream getAudioInputStream(AudioFormat targ,
|
public static AudioInputStream getAudioInputStream(AudioFormat targ,
|
||||||
AudioInputStream ais)
|
AudioInputStream ais)
|
||||||
{
|
{
|
||||||
Iterator i = ServiceFactory.lookupProviders(FormatConversionProvider.class);
|
Iterator<FormatConversionProvider> i =
|
||||||
|
ServiceFactory.lookupProviders(FormatConversionProvider.class);
|
||||||
while (i.hasNext())
|
while (i.hasNext())
|
||||||
{
|
{
|
||||||
FormatConversionProvider prov = (FormatConversionProvider) i.next();
|
FormatConversionProvider prov = i.next();
|
||||||
if (! prov.isConversionSupported(targ, ais.getFormat()))
|
if (! prov.isConversionSupported(targ, ais.getFormat()))
|
||||||
continue;
|
continue;
|
||||||
return prov.getAudioInputStream(targ, ais);
|
return prov.getAudioInputStream(targ, ais);
|
||||||
|
@ -251,10 +253,10 @@ public class AudioSystem
|
||||||
public static AudioInputStream getAudioInputStream(File f)
|
public static AudioInputStream getAudioInputStream(File f)
|
||||||
throws UnsupportedAudioFileException, IOException
|
throws UnsupportedAudioFileException, IOException
|
||||||
{
|
{
|
||||||
Iterator i = ServiceFactory.lookupProviders(AudioFileReader.class);
|
Iterator<AudioFileReader> i = ServiceFactory.lookupProviders(AudioFileReader.class);
|
||||||
while (i.hasNext())
|
while (i.hasNext())
|
||||||
{
|
{
|
||||||
AudioFileReader reader = (AudioFileReader) i.next();
|
AudioFileReader reader = i.next();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return reader.getAudioInputStream(f);
|
return reader.getAudioInputStream(f);
|
||||||
|
@ -278,10 +280,10 @@ public class AudioSystem
|
||||||
public static AudioInputStream getAudioInputStream(InputStream is)
|
public static AudioInputStream getAudioInputStream(InputStream is)
|
||||||
throws UnsupportedAudioFileException, IOException
|
throws UnsupportedAudioFileException, IOException
|
||||||
{
|
{
|
||||||
Iterator i = ServiceFactory.lookupProviders(AudioFileReader.class);
|
Iterator<AudioFileReader> i = ServiceFactory.lookupProviders(AudioFileReader.class);
|
||||||
while (i.hasNext())
|
while (i.hasNext())
|
||||||
{
|
{
|
||||||
AudioFileReader reader = (AudioFileReader) i.next();
|
AudioFileReader reader = i.next();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return reader.getAudioInputStream(is);
|
return reader.getAudioInputStream(is);
|
||||||
|
@ -305,10 +307,10 @@ public class AudioSystem
|
||||||
public static AudioInputStream getAudioInputStream(URL url)
|
public static AudioInputStream getAudioInputStream(URL url)
|
||||||
throws UnsupportedAudioFileException, IOException
|
throws UnsupportedAudioFileException, IOException
|
||||||
{
|
{
|
||||||
Iterator i = ServiceFactory.lookupProviders(AudioFileReader.class);
|
Iterator<AudioFileReader> i = ServiceFactory.lookupProviders(AudioFileReader.class);
|
||||||
while (i.hasNext())
|
while (i.hasNext())
|
||||||
{
|
{
|
||||||
AudioFileReader reader = (AudioFileReader) i.next();
|
AudioFileReader reader = i.next();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return reader.getAudioInputStream(url);
|
return reader.getAudioInputStream(url);
|
||||||
|
@ -401,10 +403,10 @@ public class AudioSystem
|
||||||
*/
|
*/
|
||||||
public static Mixer getMixer(Mixer.Info info)
|
public static Mixer getMixer(Mixer.Info info)
|
||||||
{
|
{
|
||||||
Iterator i = ServiceFactory.lookupProviders(MixerProvider.class);
|
Iterator<MixerProvider> i = ServiceFactory.lookupProviders(MixerProvider.class);
|
||||||
while (i.hasNext())
|
while (i.hasNext())
|
||||||
{
|
{
|
||||||
MixerProvider prov = (MixerProvider) i.next();
|
MixerProvider prov = i.next();
|
||||||
if (prov.isMixerSupported(info))
|
if (prov.isMixerSupported(info))
|
||||||
return prov.getMixer(info);
|
return prov.getMixer(info);
|
||||||
}
|
}
|
||||||
|
@ -417,10 +419,10 @@ public class AudioSystem
|
||||||
public static Mixer.Info[] getMixerInfo()
|
public static Mixer.Info[] getMixerInfo()
|
||||||
{
|
{
|
||||||
HashSet<Mixer.Info> result = new HashSet<Mixer.Info>();
|
HashSet<Mixer.Info> result = new HashSet<Mixer.Info>();
|
||||||
Iterator i = ServiceFactory.lookupProviders(MixerProvider.class);
|
Iterator<MixerProvider> i = ServiceFactory.lookupProviders(MixerProvider.class);
|
||||||
while (i.hasNext())
|
while (i.hasNext())
|
||||||
{
|
{
|
||||||
MixerProvider prov = (MixerProvider) i.next();
|
MixerProvider prov = i.next();
|
||||||
Mixer.Info[] is = prov.getMixerInfo();
|
Mixer.Info[] is = prov.getMixerInfo();
|
||||||
for (int j = 0; j < is.length; ++j)
|
for (int j = 0; j < is.length; ++j)
|
||||||
result.add(is[j]);
|
result.add(is[j]);
|
||||||
|
@ -536,10 +538,11 @@ public class AudioSystem
|
||||||
{
|
{
|
||||||
HashSet<AudioFormat.Encoding> result
|
HashSet<AudioFormat.Encoding> result
|
||||||
= new HashSet<AudioFormat.Encoding>();
|
= new HashSet<AudioFormat.Encoding>();
|
||||||
Iterator i = ServiceFactory.lookupProviders(FormatConversionProvider.class);
|
Iterator<FormatConversionProvider> i =
|
||||||
|
ServiceFactory.lookupProviders(FormatConversionProvider.class);
|
||||||
while (i.hasNext())
|
while (i.hasNext())
|
||||||
{
|
{
|
||||||
FormatConversionProvider prov = (FormatConversionProvider) i.next();
|
FormatConversionProvider prov = i.next();
|
||||||
if (! prov.isSourceEncodingSupported(source))
|
if (! prov.isSourceEncodingSupported(source))
|
||||||
continue;
|
continue;
|
||||||
AudioFormat.Encoding[] es = prov.getTargetEncodings();
|
AudioFormat.Encoding[] es = prov.getTargetEncodings();
|
||||||
|
@ -558,10 +561,11 @@ public class AudioSystem
|
||||||
{
|
{
|
||||||
HashSet<AudioFormat.Encoding> result
|
HashSet<AudioFormat.Encoding> result
|
||||||
= new HashSet<AudioFormat.Encoding>();
|
= new HashSet<AudioFormat.Encoding>();
|
||||||
Iterator i = ServiceFactory.lookupProviders(FormatConversionProvider.class);
|
Iterator<FormatConversionProvider> i =
|
||||||
|
ServiceFactory.lookupProviders(FormatConversionProvider.class);
|
||||||
while (i.hasNext())
|
while (i.hasNext())
|
||||||
{
|
{
|
||||||
FormatConversionProvider prov = (FormatConversionProvider) i.next();
|
FormatConversionProvider prov = i.next();
|
||||||
AudioFormat.Encoding[] es = prov.getTargetEncodings(source);
|
AudioFormat.Encoding[] es = prov.getTargetEncodings(source);
|
||||||
for (int j = 0; j < es.length; ++j)
|
for (int j = 0; j < es.length; ++j)
|
||||||
result.add(es[j]);
|
result.add(es[j]);
|
||||||
|
@ -579,10 +583,11 @@ public class AudioSystem
|
||||||
AudioFormat sourceFmt)
|
AudioFormat sourceFmt)
|
||||||
{
|
{
|
||||||
HashSet<AudioFormat> result = new HashSet<AudioFormat>();
|
HashSet<AudioFormat> result = new HashSet<AudioFormat>();
|
||||||
Iterator i = ServiceFactory.lookupProviders(FormatConversionProvider.class);
|
Iterator<FormatConversionProvider> i =
|
||||||
|
ServiceFactory.lookupProviders(FormatConversionProvider.class);
|
||||||
while (i.hasNext())
|
while (i.hasNext())
|
||||||
{
|
{
|
||||||
FormatConversionProvider prov = (FormatConversionProvider) i.next();
|
FormatConversionProvider prov = i.next();
|
||||||
AudioFormat[] es = prov.getTargetFormats(encoding, sourceFmt);
|
AudioFormat[] es = prov.getTargetFormats(encoding, sourceFmt);
|
||||||
for (int j = 0; j < es.length; ++j)
|
for (int j = 0; j < es.length; ++j)
|
||||||
result.add(es[j]);
|
result.add(es[j]);
|
||||||
|
@ -618,11 +623,11 @@ public class AudioSystem
|
||||||
public static boolean isConversionSupported(AudioFormat.Encoding targ,
|
public static boolean isConversionSupported(AudioFormat.Encoding targ,
|
||||||
AudioFormat source)
|
AudioFormat source)
|
||||||
{
|
{
|
||||||
Iterator i
|
Iterator<FormatConversionProvider> i
|
||||||
= ServiceFactory.lookupProviders(FormatConversionProvider.class);
|
= ServiceFactory.lookupProviders(FormatConversionProvider.class);
|
||||||
while (i.hasNext())
|
while (i.hasNext())
|
||||||
{
|
{
|
||||||
FormatConversionProvider prov = (FormatConversionProvider) i.next();
|
FormatConversionProvider prov = i.next();
|
||||||
if (prov.isConversionSupported(targ, source))
|
if (prov.isConversionSupported(targ, source))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -638,11 +643,11 @@ public class AudioSystem
|
||||||
public static boolean isConversionSupported(AudioFormat targ,
|
public static boolean isConversionSupported(AudioFormat targ,
|
||||||
AudioFormat source)
|
AudioFormat source)
|
||||||
{
|
{
|
||||||
Iterator i
|
Iterator<FormatConversionProvider> i
|
||||||
= ServiceFactory.lookupProviders(FormatConversionProvider.class);
|
= ServiceFactory.lookupProviders(FormatConversionProvider.class);
|
||||||
while (i.hasNext())
|
while (i.hasNext())
|
||||||
{
|
{
|
||||||
FormatConversionProvider prov = (FormatConversionProvider) i.next();
|
FormatConversionProvider prov = i.next();
|
||||||
if (prov.isConversionSupported(targ, source))
|
if (prov.isConversionSupported(targ, source))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -714,10 +719,10 @@ public class AudioSystem
|
||||||
File out)
|
File out)
|
||||||
throws IOException
|
throws IOException
|
||||||
{
|
{
|
||||||
Iterator i = ServiceFactory.lookupProviders(AudioFileWriter.class);
|
Iterator<AudioFileWriter> i = ServiceFactory.lookupProviders(AudioFileWriter.class);
|
||||||
while (i.hasNext())
|
while (i.hasNext())
|
||||||
{
|
{
|
||||||
AudioFileWriter w = (AudioFileWriter) i.next();
|
AudioFileWriter w = i.next();
|
||||||
if (w.isFileTypeSupported(type, ais))
|
if (w.isFileTypeSupported(type, ais))
|
||||||
return w.write(ais, type, out);
|
return w.write(ais, type, out);
|
||||||
}
|
}
|
||||||
|
@ -739,10 +744,10 @@ public class AudioSystem
|
||||||
OutputStream os)
|
OutputStream os)
|
||||||
throws IOException
|
throws IOException
|
||||||
{
|
{
|
||||||
Iterator i = ServiceFactory.lookupProviders(AudioFileWriter.class);
|
Iterator<AudioFileWriter> i = ServiceFactory.lookupProviders(AudioFileWriter.class);
|
||||||
while (i.hasNext())
|
while (i.hasNext())
|
||||||
{
|
{
|
||||||
AudioFileWriter w = (AudioFileWriter) i.next();
|
AudioFileWriter w = i.next();
|
||||||
if (w.isFileTypeSupported(type, ais))
|
if (w.isFileTypeSupported(type, ais))
|
||||||
return w.write(ais, type, os);
|
return w.write(ais, type, os);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* An input or output line
|
/* An input or output line
|
||||||
Copyright (C) 2005 Free Software Foundation, Inc.
|
Copyright (C) 2005, 2012 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GNU Classpath.
|
This file is part of GNU Classpath.
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@ package javax.sound.sampled;
|
||||||
* @since 1.3
|
* @since 1.3
|
||||||
*/
|
*/
|
||||||
public interface Line
|
public interface Line
|
||||||
|
extends AutoCloseable
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* An object of this type holds information about a Line.
|
* An object of this type holds information about a Line.
|
||||||
|
@ -50,7 +51,7 @@ public interface Line
|
||||||
*/
|
*/
|
||||||
class Info
|
class Info
|
||||||
{
|
{
|
||||||
private Class klass;
|
private Class<?> klass;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new Info object. The argument is the class of the line,
|
* Create a new Info object. The argument is the class of the line,
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue