+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>
* Makefile.am (lib_gnu_awt_xlib_la_CPPFLAGS): Use
* tools/gnu/classpath/tools/javah/Main.java (parseClasses): Don't
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>
Use accessor functions to manipulate xmlOutputBuffer
* native/jni/xmlj/xmlj_io.c (GET_XML_OUTPUT_BUFFER_CONTENT)
- (GET_XML_OUTPUT_BUFFER_SIZE): New macros.
- (xmljOutputWriteCallback): Use them.
+ (GET_XML_OUTPUT_BUFFER_SIZE): New macros.
+ (xmljOutputWriteCallback): Use them.
+
+2012-08-09 Andrew John Hughes <gnu_andrew@member.fsf.org>
+
+ * java/util/TimeZone.java:
+ (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>
-2012-03-08 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.
- * NEWS: Set correct release date.
- * configure.ac: Bump to 0.99 proper.
+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-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>
* configure: Regenerated.
Installation Instructions
*************************
-Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
-Inc.
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007, 2008, 2009 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
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
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
target_triplet = @target@
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/../../compile \
- $(srcdir)/../../config.guess $(srcdir)/../../config.sub \
- $(srcdir)/../../install-sh $(srcdir)/../../ltmain.sh \
- $(srcdir)/../../missing $(srcdir)/../../mkinstalldirs \
- $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(top_srcdir)/configure \
+ $(srcdir)/../../config.guess $(srcdir)/../../config.rpath \
+ $(srcdir)/../../config.sub $(srcdir)/../../install-sh \
+ $(srcdir)/../../ltmain.sh $(srcdir)/../../missing \
+ $(srcdir)/../../mkinstalldirs $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in $(top_srcdir)/configure \
$(top_srcdir)/gnu/classpath/Configuration.java.in \
$(top_srcdir)/gnu/java/security/Configuration.java.in \
$(top_srcdir)/resource/META-INF/services/java.util.prefs.PreferencesFactory.in \
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.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/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.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) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
+MOC4 = @MOC4@
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
MOZILLA_LIBS = @MOZILLA_LIBS@
NM = @NM@
-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.io.IOError.
Patrick Doyle (doylep@eecg.toronto.edu)
Julian Dolby (dolby@us.ibm.com)
Raimar Falke (hawk@hawk.shef.ac.uk)
+Paul Fernhout (pdfernhout@kurtz-fernhout.com)
Philip Fong (pwlfong@users.sourceforge.net)
Jeroen Frijters (jeroen@sumatra.nl)
Etienne M. Gagnon (etienne.gagnon@uqam.ca)
Julian Scheid (julian.scheid@sektor37.de)
Martin Schröder (ms@artcom-gmbh.de)
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)
Michael Smith (msmith@spinnakernet.com)
J. Russell Smyth (drfish@uswest.net)
Jeff Sturm (jsturm@one-point.com)
Sreenivas Subramoney (sreenivas.subramoney@intel.com)
Chris Toshok (toshok@hungry.com)
+Paul Viney (paul@diasoft.nl)
Weldon Washburn (weldon.washburn@intel.com)
Adam Welc (welc@cs.purdue.edu)
Gansha Wu (gansha.wu@intel.com)
m4_include([../../config/depstand.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/no-executables.m4])
m4_include([../../config/override.m4])
m4_include([m4/ax_func_which_gethostbyname_r.m4])
m4_include([m4/gcc_attribute.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])
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 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.
# The presence of a machine in this file suggests that SOME GNU software
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
-Software Foundation, Inc.
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
os=-$maybe_os
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/-[^-]*$//'`
if [ $basic_machine != $1 ]
-isc*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
+ -lynx*178)
+ os=-lynxos178
+ ;;
+ -lynx*5)
+ os=-lynxos5
+ ;;
-lynx*)
os=-lynxos
;;
# Some are omitted here because they have special meanings below.
1750a | 580 \
| a29k \
+ | aarch64 | aarch64_be \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
c6x)
basic_machine=tic6x-unknown
;;
- m6811 | m68hc11 | m6812 | m68hc12 | picochip)
- # Motorola 68HC11/12.
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
basic_machine=$basic_machine-unknown
os=-none
;;
strongarm | thumb | xscale)
basic_machine=arm-unknown
;;
-
+ xgate)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
xscaleeb)
basic_machine=armeb-unknown
;;
# Recognize the basic CPU types with company name.
580-* \
| a29k-* \
+ | aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
i370-ibm* | ibm*)
basic_machine=i370-ibm
;;
-# I'm not sure what "Sysv32" means. Should this be sysv3.2?
i*86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
ms1-*)
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
+ msys)
+ basic_machine=i386-pc
+ os=-msys
+ ;;
mvs)
basic_machine=i370-ibm
os=-mvs
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
;;
m68000-sun)
os=-sunos3
- # This also exists in the configure program, but was not the
- # default.
- # os=-sunos4
;;
m68*-cisco)
os=-aout
#! /bin/sh
# 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>.
#
# Identity of this package.
PACKAGE_NAME='GNU Classpath'
PACKAGE_TARNAME='classpath'
-PACKAGE_VERSION='0.99'
-PACKAGE_STRING='GNU Classpath 0.99'
+PACKAGE_VERSION='0.99.1-pre'
+PACKAGE_STRING='GNU Classpath 0.99.1-pre'
PACKAGE_BUGREPORT='classpath@gnu.org'
PACKAGE_URL='http://www.gnu.org/software/classpath/'
GLIB_CFLAGS
MOZILLA_LIBS
MOZILLA_CFLAGS
+MOC4
MOC
QT_LIBS
QT_CFLAGS
# 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.
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]...
if test -n "$ac_init_help"; then
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
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-GNU Classpath configure 0.99
+GNU Classpath configure 0.99.1-pre
generated by GNU Autoconf 2.64
Copyright (C) 2009 Free Software Foundation, Inc.
This file contains any messages produced by compilers while
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
$ $0 $@
# Define the identity of the package.
PACKAGE='classpath'
- VERSION='0.99'
+ VERSION='0.99.1-pre'
cat >>confdefs.h <<_ACEOF
enableval=$enable_Werror; case "${enableval}" in
yes) ENABLE_WERROR=yes ;;
no) ENABLE_WERROR=no ;;
- *) ENABLE_WERROR=default ;;
+ *) ENABLE_WERROR=no ;;
esac
else
- ENABLE_WERROR=default
+ ENABLE_WERROR=no
fi
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11822 "configure"
+#line 11823 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11928 "configure"
+#line 11929 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
# Canonicalize the path of ld
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
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
test -z "$LD" && LD="$ac_prog"
;;
# Check to see if the program is GNU ld. I'd rather use --version,
# but apparently some GNU ld's only accept -v.
# 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
- test "$with_gnu_ld" != no && break
- else
- test "$with_gnu_ld" != yes && break
- fi
+ case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break ;;
+ *)
+ test "$with_gnu_ld" != yes && break ;;
+ esac
fi
done
IFS="$ac_save_ifs"
$as_echo_n "(cached) " >&6
else
# 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
- acl_cv_prog_gnu_ld=yes
-else
- acl_cv_prog_gnu_ld=no
-fi
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ acl_cv_prog_gnu_ld=yes ;;
+*)
+ acl_cv_prog_gnu_ld=no ;;
+esac
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
$as_echo "$acl_cv_prog_gnu_ld" >&6; }
+
{ $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; }
if test "${acl_cv_rpath+set}" = set; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
$as_echo "$acl_cv_rpath" >&6; }
wl="$acl_cv_wl"
- libext="$acl_cv_libext"
- shlibext="$acl_cv_shlibext"
- hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
- hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
- hardcode_direct="$acl_cv_hardcode_direct"
- hardcode_minus_L="$acl_cv_hardcode_minus_L"
+ acl_libext="$acl_cv_libext"
+ acl_shlibext="$acl_cv_shlibext"
+ acl_libname_spec="$acl_cv_libname_spec"
+ acl_library_names_spec="$acl_cv_library_names_spec"
+ acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+ 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.
if test "${enable_rpath+set}" = set; then :
enableval=$enable_rpath; :
+ 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"
+
+
+
+
+
+
+
+
else
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
LIBICONV=
LTLIBICONV=
INCICONV=
+ LIBICONV_PREFIX=
+ HAVE_LIBICONV=
rpathdirs=
ltrpathdirs=
names_already_handled=
found_la=
found_so=
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 -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
- found_dir="$additional_libdir"
- found_so="$additional_libdir/lib$name.$shlibext"
- if test -f "$additional_libdir/lib$name.la"; then
- found_la="$additional_libdir/lib$name.la"
- fi
- else
- if test -f "$additional_libdir/lib$name.$libext"; then
- found_dir="$additional_libdir"
- found_a="$additional_libdir/lib$name.$libext"
- if test -f "$additional_libdir/lib$name.la"; then
- found_la="$additional_libdir/lib$name.la"
+ dir="$additional_libdir"
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ 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
+ 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
if test "X$found_dir" = "X"; then
case "$x" in
-L*)
dir=`echo "X$x" | sed -e 's/^X-L//'`
- if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
- found_dir="$dir"
- 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
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
found_dir="$dir"
- found_a="$dir/lib$name.$libext"
- if test -f "$dir/lib$name.la"; then
- found_la="$dir/lib$name.la"
+ found_so="$dir/$libname$shrext"
+ else
+ 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
+ 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
;;
esac
if test "X$found_dir" != "X"; then
LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
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"
else
haveit=
if test -z "$haveit"; then
ltrpathdirs="$ltrpathdirs $found_dir"
fi
- if test "$hardcode_direct" = yes; then
+ if test "$acl_hardcode_direct" = yes; then
LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
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"
haveit=
for x in $rpathdirs; do
if test -z "$haveit"; then
LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
fi
- if test "$hardcode_minus_L" != no; then
+ if test "$acl_hardcode_minus_L" != no; then
LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
else
LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
fi
additional_includedir=
case "$found_dir" in
- */lib | */lib/)
- basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+ */$acl_libdirstem | */$acl_libdirstem/)
+ 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"
;;
esac
if test "X$additional_includedir" = "X/usr/local/include"; then
if test -n "$GCC"; then
case $host_os in
- linux*) haveit=yes;;
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
esac
fi
fi
case "$dep" in
-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=
- 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
case $host_os in
- linux*) haveit=yes;;
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
esac
fi
fi
done
done
if test "X$rpathdirs" != "X"; then
- if test -n "$hardcode_libdir_separator"; then
+ if test -n "$acl_hardcode_libdir_separator"; then
alldirs=
for found_dir in $rpathdirs; do
- alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
done
acl_save_libdir="$libdir"
libdir="$alldirs"
- eval flag=\"$hardcode_libdir_flag_spec\"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
libdir="$acl_save_libdir"
LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
else
for found_dir in $rpathdirs; do
acl_save_libdir="$libdir"
libdir="$found_dir"
- eval flag=\"$hardcode_libdir_flag_spec\"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
libdir="$acl_save_libdir"
LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
done
+
+
+
+
+
am_save_CPPFLAGS="$CPPFLAGS"
for element in $INCICONV; do
set dummy moc-qt4; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$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
else
- if test -n "$MOC"; then
- ac_cv_prog_MOC="$MOC" # Let the user override the test.
+ if test -n "$MOC4"; then
+ ac_cv_prog_MOC4="$MOC4" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
test -z "$as_dir" && as_dir=.
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
- 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
break 2
fi
fi
fi
-MOC=$ac_cv_prog_MOC
-if test -n "$MOC"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOC" >&5
-$as_echo "$MOC" >&6; }
+MOC4=$ac_cv_prog_MOC4
+if test -n "$MOC4"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOC4" >&5
+$as_echo "$MOC4" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
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
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
case ${gjdoc_version} in
0.7.9) ;;
0.8*) ;;
+ 0.9*) ;;
+ 1*) ;;
*) as_fn_error "Building documentation requires GJDoc >= 0.7.9, ${gjdoc_version} found." "$LINENO" 5 ;;
esac
fi
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"
GCJ_OPTS="-g"
if test "x$JAVAPREFIX" = x; then
JAVA_TEST=Object.java
CLASS_TEST=Object.class
cat << \EOF > $JAVA_TEST
-/* #line 23890 "configure" */
+/* #line 24049 "configure" */
package java.lang;
public class Object
if uudecode$EXEEXT Test.uue; then
ac_cv_prog_uudecode_base64=yes
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
cat Test.uue >&5
ac_cv_prog_uudecode_base64=no
CLASS_TEST=Test.class
TEST=Test
cat << \EOF > $JAVA_TEST
-/* [#]line 24011 "configure" */
+/* [#]line 24170 "configure" */
public class Test {
public static void main (String args[]) {
System.exit (0);
JAVA_TEST=Test.java
CLASS_TEST=Test.class
cat << \EOF > $JAVA_TEST
- /* #line 24219 "configure" */
+ /* #line 24378 "configure" */
public class Test
{
public static void main(String args)
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
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
CONFIG_FILES = $CONFIG_FILES
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
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,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
dnl define([AC_CACHE_LOAD], )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_MACRO_DIR([m4])
AC_SUBST(CLASSPATH_CONVENIENCE)
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_PREFIX_DEFAULT(/usr/local/classpath)
[case "${enableval}" in
yes) ENABLE_WERROR=yes ;;
no) ENABLE_WERROR=no ;;
- *) ENABLE_WERROR=default ;;
+ *) ENABLE_WERROR=no ;;
esac],
- [ENABLE_WERROR=default])
+ [ENABLE_WERROR=no])
dnl -----------------------------------------------------------
dnl Default AWT toolkit
QT_CFLAGS="$QT_CFLAGS -I$EXTRA_QT_INCLUDE_DIR",
AC_MSG_WARN([QWidget not found])))
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
if test "x$HAVE_QT4" = "xno"; then
AC_MSG_NOTICE([Looking for QT_CFLAGS and QT_LIBS without pkg-config])
#! /bin/sh
# 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,
-# 2011 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
+# Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
object Object file output by `PROGRAMS ARGS'.
DEPDIR directory where to store dependencies.
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).
Report bugs to <bug-automake@gnu.org>.
# This is just like msvisualcpp but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
- cygpath_u='sed s,\\\\,/,g'
+ cygpath_u="sed s,\\\\\\\\,/,g"
depmode=msvisualcpp
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
gcc3)
## gcc 3 implements dependency tracking that does exactly what
' < "$tmpdepfile" |
## 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
-## well. hp depmode also adds that space, but also prefixes the VPATH
-## to the object. Take care to not repeat it in the output.
+## well.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
- | sed -e 's/$/ :/' >> "$depfile"
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
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)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
- # makedepend may prepend the VPATH from the source file name to the object.
- # No need to regex-escape $object, excess matching of '.' is harmless.
- sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation
TEXINFO_TEX = ../../gcc/doc/include/texinfo.tex
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:
- texi2dvi $<
+ LC_ALL=POSIX texi2dvi --build-dir=$(builddir) -o $@ $<
.dvi.ps:
dvips -o $@ $<
$(srcdir)/gserialver.1 \
$(srcdir)/gtnameserv.1 \
$(srcdir)/cp-tools.info
+
+clean-local:
+ -rm -rf *.t2d
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.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/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.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) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
+MOC4 = @MOC4@
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
MOZILLA_LIBS = @MOZILLA_LIBS@
NM = @NM@
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
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
-rm -f Makefile
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am all-local check check-am clean clean-aminfo \
- clean-generic clean-libtool ctags ctags-recursive dist-info \
- distclean distclean-generic distclean-libtool distclean-tags \
- distdir dvi dvi-am html html-am info info-am install \
- install-am install-data install-data-am install-dvi \
+ clean-generic clean-libtool clean-local ctags ctags-recursive \
+ dist-info distclean distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-man1 install-pdf install-pdf-am install-ps \
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:
- texi2dvi $<
+ LC_ALL=POSIX texi2dvi --build-dir=$(builddir) -o $@ $<
.dvi.ps:
dvips -o $@ $<
-cp -p cp-tools.info $(srcdir)/cp-tools.info
touch $@
+clean-local:
+ -rm -rf *.t2d
+
# 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.
.NOEXPORT:
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.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/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.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) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
+MOC4 = @MOC4@
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
MOZILLA_LIBS = @MOZILLA_LIBS@
NM = @NM@
Let's say that a class javadoc comment contains
@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
Then the HTML output will contain something like
@smallexample
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 table
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2012-01-03.09}
+\def\texinfoversion{2009-08-14.15}
%
% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-% 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+% 2007, 2008, 2009 Free Software Foundation, Inc.
%
% This texinfo.tex file is free software: you can redistribute it and/or
% modify it under the terms of the GNU General Public License as
\everyjob{\message{[Texinfo version \texinfoversion]}%
\catcode`+=\active \catcode`\_=\active}
+
\chardef\other=12
% We never want plain's \outer definition of \+ in Texinfo.
\let\ptexnewwrite\newwrite
\let\ptexnoindent=\noindent
\let\ptexplus=+
-\let\ptexraggedright=\raggedright
\let\ptexrbrace=\}
\let\ptexslash=\/
\let\ptexstar=\*
\let\ptext=\t
\let\ptextop=\top
-{\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode
+{\catcode`\'=\active
+\global\let\ptexquoteright'}% Math-mode def from plain.tex.
+\let\ptexraggedright=\raggedright
% If this character appears in an error message or help string, it
% starts a new line in the output.
% Set up fixed words for English if not already set.
\ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi
\ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi
-\ifx\putworderror\undefined \gdef\putworderror{error}\fi
\ifx\putwordfile\undefined \gdef\putwordfile{file}\fi
\ifx\putwordin\undefined \gdef\putwordin{in}\fi
-\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi
-\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi
+\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi
+\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi
\ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi
\ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi
\ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi
\def\spaceisspace{\catcode`\ =\spacecat}
% sometimes characters are active, so we need control sequences.
-\chardef\ampChar = `\&
\chardef\colonChar = `\:
\chardef\commaChar = `\,
\chardef\dashChar = `\-
\chardef\dotChar = `\.
\chardef\exclamChar= `\!
-\chardef\hashChar = `\#
\chardef\lquoteChar= `\`
\chardef\questChar = `\?
\chardef\rquoteChar= `\'
\chardef\semiChar = `\;
-\chardef\slashChar = `\/
\chardef\underChar = `\_
% Ignore a token.
% that mark overfull boxes (in case you have decided
% that the text looks ok even though it passes the margin).
%
-\def\finalout{\overfullrule=0pt }
+\def\finalout{\overfullrule=0pt}
+
+% @| inserts a changebar to the left of the current line. It should
+% surround any changed text. This approach does *not* work if the
+% change spans more than two lines of output. To handle that, we would
+% have adopt a much more difficult approach (putting marks into the main
+% vertical list for the beginning and end of each change).
+%
+\def\|{%
+ % \vadjust can only be used in horizontal mode.
+ \leavevmode
+ %
+ % Append this vertical mode material after the current line in the output.
+ \vadjust{%
+ % We want to insert a rule with the height and depth of the current
+ % leading; that is exactly what \strutbox is supposed to record.
+ \vskip-\baselineskip
+ %
+ % \vadjust-items are inserted at the left edge of the type. So
+ % the \llap here moves out into the left-hand margin.
+ \llap{%
+ %
+ % For a thicker or thinner bar, change the `1pt'.
+ \vrule height\baselineskip width1pt
+ %
+ % This is the space between the bar and the text.
+ \hskip 12pt
+ }%
+ }%
+}
% Sometimes it is convenient to have everything in the transcript file
% and nothing on the terminal. We don't just call \tracingall here,
\tracingmacros2
\tracingrestores1
\showboxbreadth\maxdimen \showboxdepth\maxdimen
- \ifx\eTeXversion\thisisundefined\else % etex gives us more logging
+ \ifx\eTeXversion\undefined\else % etex gives us more logging
\tracingscantokens1
\tracingifs1
\tracinggroups1
\errorcontextlines16
}%
-% @errormsg{MSG}. Do the index-like expansions on MSG, but if things
-% aren't perfect, it's not the end of the world, being an error message,
-% after all.
-%
-\def\errormsg{\begingroup \indexnofonts \doerrormsg}
-\def\doerrormsg#1{\errmessage{#1}}
-
% add check for \lastpenalty to plain's definitions. If the last thing
% we did was a \nobreak, we don't want to insert more space.
%
\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount
\removelastskip\penalty-200\bigskip\fi\fi}
+% For @cropmarks command.
% Do @cropmarks to get crop marks.
%
\newif\ifcropmarks
}
\def\inenvironment#1{%
\ifx#1\empty
- outside of any environment%
+ out of any environment%
\else
in environment \expandafter\string#1%
\fi
\parseargdef\end{%
\if 1\csname iscond.#1\endcsname
\else
- % The general wording of \badenverr may not be ideal.
+ % The general wording of \badenverr may not be ideal, but... --kasal, 06nov03
\expandafter\checkenv\csname#1\endcsname
\csname E#1\endcsname
\endgroup
\newhelp\EMsimple{Press RETURN to continue.}
+%% Simple single-character @ commands
+
+% @@ prints an @
+% Kludge this until the fonts are right (grr).
+\def\@{{\tt\char64}}
+
+% This is turned off because it was never documented
+% and you can use @w{...} around a quote to suppress ligatures.
+%% Define @` and @' to be the same as ` and '
+%% but suppressing ligatures.
+%\def\`{{`}}
+%\def\'{{'}}
+
+% Used to generate quoted braces.
+\def\mylbrace {{\tt\char123}}
+\def\myrbrace {{\tt\char125}}
+\let\{=\mylbrace
+\let\}=\myrbrace
+\begingroup
+ % Definitions to produce \{ and \} commands for indices,
+ % and @{ and @} for the aux/toc files.
+ \catcode`\{ = \other \catcode`\} = \other
+ \catcode`\[ = 1 \catcode`\] = 2
+ \catcode`\! = 0 \catcode`\\ = \other
+ !gdef!lbracecmd[\{]%
+ !gdef!rbracecmd[\}]%
+ !gdef!lbraceatcmd[@{]%
+ !gdef!rbraceatcmd[@}]%
+!endgroup
+
+% @comma{} to avoid , parsing problems.
+\let\comma = ,
+
+% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
+% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H.
+\let\, = \c
+\let\dotaccent = \.
+\def\ringaccent#1{{\accent23 #1}}
+\let\tieaccent = \t
+\let\ubaraccent = \b
+\let\udotaccent = \d
+
+% Other special characters: @questiondown @exclamdown @ordf @ordm
+% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
+\def\questiondown{?`}
+\def\exclamdown{!`}
+\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}}
+\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}}
+
+% Dotless i and dotless j, used for accents.
+\def\imacro{i}
+\def\jmacro{j}
+\def\dotless#1{%
+ \def\temp{#1}%
+ \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi
+ \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi
+ \else \errmessage{@dotless can be used only with i or j}%
+ \fi\fi
+}
+
+% The \TeX{} logo, as in plain, but resetting the spacing so that a
+% period following counts as ending a sentence. (Idea found in latex.)
+%
+\edef\TeX{\TeX \spacefactor=1000 }
+
+% @LaTeX{} logo. Not quite the same results as the definition in
+% latex.ltx, since we use a different font for the raised A; it's most
+% convenient for us to use an explicitly smaller font, rather than using
+% the \scriptstyle font (since we don't reset \scriptstyle and
+% \scriptscriptstyle).
+%
+\def\LaTeX{%
+ L\kern-.36em
+ {\setbox0=\hbox{T}%
+ \vbox to \ht0{\hbox{\selectfonts\lllsize A}\vss}}%
+ \kern-.15em
+ \TeX
+}
+
% Be sure we're in horizontal mode when doing a tie, since we make space
% equivalent to this in @example-like environments. Otherwise, a space
% at the beginning of a line will start with \penalty -- and
\else\ifx\temp\offword \plainnonfrenchspacing
\else
\errhelp = \EMsimple
- \errmessage{Unknown @frenchspacing option `\temp', must be on|off}%
+ \errmessage{Unknown @frenchspacing option `\temp', must be on/off}%
\fi\fi
}
\newdimen\mil \mil=0.001in
+% Old definition--didn't work.
+%\parseargdef\need{\par %
+%% This method tries to make TeX break the page naturally
+%% if the depth of the box does not fit.
+%{\baselineskip=0pt%
+%\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak
+%\prevdepth=-1000pt
+%}}
+
\parseargdef\need{%
% Ensure vertical mode, so we don't make a big box in the middle of a
% paragraph.
% @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current
% paragraph. For more general purposes, use the \margin insertion
-% class. WHICH is `l' or `r'. Not documented, written for gawk manual.
+% class. WHICH is `l' or `r'.
%
\newskip\inmarginspacing \inmarginspacing=1cm
\def\strutdepth{\dp\strutbox}
\temp
}
-% @| inserts a changebar to the left of the current line. It should
-% surround any changed text. This approach does *not* work if the
-% change spans more than two lines of output. To handle that, we would
-% have adopt a much more difficult approach (putting marks into the main
-% vertical list for the beginning and end of each change). This command
-% is not documented, not supported, and doesn't work.
-%
-\def\|{%
- % \vadjust can only be used in horizontal mode.
- \leavevmode
- %
- % Append this vertical mode material after the current line in the output.
- \vadjust{%
- % We want to insert a rule with the height and depth of the current
- % leading; that is exactly what \strutbox is supposed to record.
- \vskip-\baselineskip
- %
- % \vadjust-items are inserted at the left edge of the type. So
- % the \llap here moves out into the left-hand margin.
- \llap{%
- %
- % For a thicker or thinner bar, change the `1pt'.
- \vrule height\baselineskip width1pt
- %
- % This is the space between the bar and the text.
- \hskip 12pt
- }%
- }%
-}
-
% @include FILE -- \input text of FILE.
%
\def\include{\parseargusing\filenamecatcodes\includezzz}
\makevalueexpandable % we want to expand any @value in FILE.
\turnoffactive % and allow special characters in the expansion
\indexnofonts % Allow `@@' and other weird things in file names.
- \wlog{texinfo.tex: doing @include of #1^^J}%
\edef\temp{\noexpand\input #1 }%
%
% This trickery is to read FILE outside of a group, in case it makes
}
+% @asis just yields its argument. Used with @table, for example.
+%
+\def\asis#1{#1}
+
+% @math outputs its argument in math mode.
+%
+% One complication: _ usually means subscripts, but it could also mean
+% an actual _ character, as in @math{@var{some_variable} + 1}. So make
+% _ active, and distinguish by seeing if the current family is \slfam,
+% which is what @var uses.
+{
+ \catcode`\_ = \active
+ \gdef\mathunderscore{%
+ \catcode`\_=\active
+ \def_{\ifnum\fam=\slfam \_\else\sb\fi}%
+ }
+}
+% Another complication: we want \\ (and @\) to output a \ character.
+% FYI, plain.tex uses \\ as a temporary control sequence (why?), but
+% this is not advertised and we don't care. Texinfo does not
+% otherwise define @\.
+%
+% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
+\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
+%
+\def\math{%
+ \tex
+ \mathunderscore
+ \let\\ = \mathbackslash
+ \mathactive
+ % make the texinfo accent commands work in math mode
+ \let\"=\ddot
+ \let\'=\acute
+ \let\==\bar
+ \let\^=\hat
+ \let\`=\grave
+ \let\u=\breve
+ \let\v=\check
+ \let\~=\tilde
+ \let\dotaccent=\dot
+ $\finishmath
+}
+\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex.
+
+% Some active characters (such as <) are spaced differently in math.
+% We have to reset their definitions in case the @math was an argument
+% to a command which sets the catcodes (such as @item or @section).
+%
+{
+ \catcode`^ = \active
+ \catcode`< = \active
+ \catcode`> = \active
+ \catcode`+ = \active
+ \catcode`' = \active
+ \gdef\mathactive{%
+ \let^ = \ptexhat
+ \let< = \ptexless
+ \let> = \ptexgtr
+ \let+ = \ptexplus
+ \let' = \ptexquoteright
+ }
+}
+
+% Some math mode symbols.
+\def\bullet{$\ptexbullet$}
+\def\geq{\ifmmode \ge\else $\ge$\fi}
+\def\leq{\ifmmode \le\else $\le$\fi}
+\def\minus{\ifmmode -\else $-$\fi}
+
+% @dots{} outputs an ellipsis using the current font.
+% We do .5em per period so that it has the same spacing in the cm
+% typewriter fonts as three actual period characters; on the other hand,
+% in other typewriter fonts three periods are wider than 1.5em. So do
+% whichever is larger.
+%
+\def\dots{%
+ \leavevmode
+ \setbox0=\hbox{...}% get width of three periods
+ \ifdim\wd0 > 1.5em
+ \dimen0 = \wd0
+ \else
+ \dimen0 = 1.5em
+ \fi
+ \hbox to \dimen0{%
+ \hskip 0pt plus.25fil
+ .\hskip 0pt plus1fil
+ .\hskip 0pt plus1fil
+ .\hskip 0pt plus.5fil
+ }%
+}
+
+% @enddots{} is an end-of-sentence ellipsis.
+%
+\def\enddots{%
+ \dots
+ \spacefactor=\endofsentencespacefactor
+}
+
+% @comma{} is so commas can be inserted into text without messing up
+% Texinfo's parsing.
+%
+\let\comma = ,
+
% @refill is a no-op.
\let\refill=\relax
\newif\ifpdfmakepagedest
% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
-% can be set). So we test for \relax and 0 as well as being undefined.
-\ifx\pdfoutput\thisisundefined
+% can be set). So we test for \relax and 0 as well as \undefined,
+% borrowed from ifpdf.sty.
+\ifx\pdfoutput\undefined
\else
\ifx\pdfoutput\relax
\else
% for display in the outlines, and in other places. Thus, we have to
% double any backslashes. Otherwise, a name like "\node" will be
% interpreted as a newline (\n), followed by o, d, e. Not good.
-%
-% See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and
-% related messages. The final outcome is that it is up to the TeX user
-% to double the backslashes and otherwise make the string valid, so
-% that's what we do. pdftex 1.30.0 (ca.2005) introduced a primitive to
-% do this reliably, so we use it.
-
-% #1 is a control sequence in which to do the replacements,
-% which we \xdef.
-\def\txiescapepdf#1{%
- \ifx\pdfescapestring\relax
- % No primitive available; should we give a warning or log?
- % Many times it won't matter.
- \else
- % The expandable \pdfescapestring primitive escapes parentheses,
- % backslashes, and other special chars.
- \xdef#1{\pdfescapestring{#1}}%
- \fi
+% http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html
+% (and related messages, the final outcome is that it is up to the TeX
+% user to double the backslashes and otherwise make the string valid, so
+% that's what we do).
+
+% double active backslashes.
+%
+{\catcode`\@=0 \catcode`\\=\active
+ @gdef@activebackslashdouble{%
+ @catcode`@\=@active
+ @let\=@doublebackslash}
+}
+
+% To handle parens, we must adopt a different approach, since parens are
+% not active characters. hyperref.dtx (which has the same problem as
+% us) handles it with this amazing macro to replace tokens, with minor
+% changes for Texinfo. It is included here under the GPL by permission
+% from the author, Heiko Oberdiek.
+%
+% #1 is the tokens to replace.
+% #2 is the replacement.
+% #3 is the control sequence with the string.
+%
+\def\HyPsdSubst#1#2#3{%
+ \def\HyPsdReplace##1#1##2\END{%
+ ##1%
+ \ifx\\##2\\%
+ \else
+ #2%
+ \HyReturnAfterFi{%
+ \HyPsdReplace##2\END
+ }%
+ \fi
+ }%
+ \xdef#3{\expandafter\HyPsdReplace#3#1\END}%
+}
+\long\def\HyReturnAfterFi#1\fi{\fi#1}
+
+% #1 is a control sequence in which to do the replacements.
+\def\backslashparens#1{%
+ \xdef#1{#1}% redefine it as its expansion; the definition is simply
+ % \lastnode when called from \setref -> \pdfmkdest.
+ \HyPsdSubst{(}{\realbackslash(}{#1}%
+ \HyPsdSubst{)}{\realbackslash)}{#1}%
}
\newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images
\def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
\def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
%
- % pdftex (and the PDF format) support .pdf, .png, .jpg (among
- % others). Let's try in that order, PDF first since if
- % someone has a scalable image, presumably better to use that than a
- % bitmap.
+ % pdftex (and the PDF format) support .png, .jpg, .pdf (among
+ % others). Let's try in that order.
\let\pdfimgext=\empty
\begingroup
- \openin 1 #1.pdf \ifeof 1
- \openin 1 #1.PDF \ifeof 1
- \openin 1 #1.png \ifeof 1
- \openin 1 #1.jpg \ifeof 1
- \openin 1 #1.jpeg \ifeof 1
- \openin 1 #1.JPG \ifeof 1
+ \openin 1 #1.png \ifeof 1
+ \openin 1 #1.jpg \ifeof 1
+ \openin 1 #1.jpeg \ifeof 1
+ \openin 1 #1.JPG \ifeof 1
+ \openin 1 #1.pdf \ifeof 1
+ \openin 1 #1.PDF \ifeof 1
\errhelp = \nopdfimagehelp
\errmessage{Could not find image file #1 for pdf}%
- \else \gdef\pdfimgext{JPG}%
+ \else \gdef\pdfimgext{PDF}%
\fi
- \else \gdef\pdfimgext{jpeg}%
+ \else \gdef\pdfimgext{pdf}%
\fi
- \else \gdef\pdfimgext{jpg}%
+ \else \gdef\pdfimgext{JPG}%
\fi
- \else \gdef\pdfimgext{png}%
+ \else \gdef\pdfimgext{jpeg}%
\fi
- \else \gdef\pdfimgext{PDF}%
+ \else \gdef\pdfimgext{jpg}%
\fi
- \else \gdef\pdfimgext{pdf}%
+ \else \gdef\pdfimgext{png}%
\fi
\closein 1
\endgroup
% such as \, aren't expanded when present in a section title.
\indexnofonts
\turnoffactive
+ \activebackslashdouble
\makevalueexpandable
\def\pdfdestname{#1}%
- \txiescapepdf\pdfdestname
+ \backslashparens\pdfdestname
\safewhatsit{\pdfdest name{\pdfdestname} xyz}%
}}
%
% page number. We could generate a destination for the section
% text in the case where a section has no node, but it doesn't
% seem worth the trouble, since most documents are normally structured.
- \edef\pdfoutlinedest{#3}%
+ \def\pdfoutlinedest{#3}%
\ifx\pdfoutlinedest\empty
\def\pdfoutlinedest{#4}%
\else
- \txiescapepdf\pdfoutlinedest
+ % Doubled backslashes in the name.
+ {\activebackslashdouble \xdef\pdfoutlinedest{#3}%
+ \backslashparens\pdfoutlinedest}%
\fi
%
- % Also escape PDF chars in the display string.
- \edef\pdfoutlinetext{#1}%
- \txiescapepdf\pdfoutlinetext
+ % Also double the backslashes in the display string.
+ {\activebackslashdouble \xdef\pdfoutlinetext{#1}%
+ \backslashparens\pdfoutlinetext}%
%
\pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}%
}
%
\def\pdfmakeoutlines{%
\begingroup
+ % Thanh's hack / proper braces in bookmarks
+ \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace
+ \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace
+ %
% Read toc silently, to get counts of subentries for \pdfoutline.
- \def\partentry##1##2##3##4{}% ignore parts in the outlines
\def\numchapentry##1##2##3##4{%
\def\thischapnum{##2}%
\def\thissecnum{0}%
% Latin 2 (0xea) gets translated to a | character. Info from
% Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100.
%
- % TODO this right, we have to translate 8-bit characters to
- % their "best" equivalent, based on the @documentencoding. Too
- % much work for too little return. Just use the ASCII equivalents
- % we use for the index sort strings.
- %
+ % xx to do this right, we have to translate 8-bit characters to
+ % their "best" equivalent, based on the @documentencoding. Right
+ % now, I guess we'll just let the pdf reader have its way.
\indexnofonts
\setupdatafile
- % We can have normal brace characters in the PDF outlines, unlike
- % Texinfo index files. So set that up.
- \def\{{\lbracecharliteral}%
- \def\}{\rbracecharliteral}%
\catcode`\\=\active \otherbackslash
\input \tocreadfilename
\endgroup
}
- {\catcode`[=1 \catcode`]=2
- \catcode`{=\other \catcode`}=\other
- \gdef\lbracecharliteral[{]%
- \gdef\rbracecharliteral[}]%
- ]
%
\def\skipspaces#1{\def\PP{#1}\def\D{|}%
\ifx\PP\D\let\nextsp\relax
% if we are producing pdf, and we have \pdffontattr, then define cmaps.
% (\pdffontattr was introduced many years ago, but people still run
% older pdftex's; it's easy to conditionalize, so we do.)
-\ifpdf \ifx\pdffontattr\thisisundefined \else
+\ifpdf \ifx\pdffontattr\undefined \else
\begingroup
\catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
\catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
% Use cm as the default font prefix.
% To specify the font prefix, you must define \fontprefix
% before you read in texinfo.tex.
-\ifx\fontprefix\thisisundefined
+\ifx\fontprefix\undefined
\def\fontprefix{cm}
\fi
% Support font families that don't use the same naming scheme as CM.
\font\reducedsy=cmsy10
\def\reducedecsize{1000}
-\textleading = 13.2pt % line spacing for 11pt CM
-\textfonts % reset the current fonts
+% reset the current fonts
+\textfonts
\rm
} % end of 11pt text font size definitions
\font\reducedsy=cmsy9
\def\reducedecsize{0900}
-\divide\parskip by 2 % reduce space between paragraphs
-\textleading = 12pt % line spacing for 10pt CM
-\textfonts % reset the current fonts
+% reduce space between paragraphs
+\divide\parskip by 2
+
+% reset the current fonts
+\textfonts
\rm
} % end of 10pt text font size definitions
% @fonttextsize 10
% (or 11) to redefine the text font size. pt is assumed.
%
-\def\xiword{11}
\def\xword{10}
-\def\xwordpt{10pt}
+\def\xiword{11}
%
\parseargdef\fonttextsize{%
\def\textsizearg{#1}%
- %\wlog{doing @fonttextsize \textsizearg}%
+ \wlog{doing @fonttextsize \textsizearg}%
%
% Set \globaldefs so that documents can use this inside @tex, since
% makeinfo 4.8 does not support it, but we need it nonetheless.
\let\tenttsl=\titlettsl
\def\curfontsize{title}%
\def\lsize{chap}\def\lllsize{subsec}%
- \resetmathfonts \setleading{27pt}}
+ \resetmathfonts \setleading{25pt}}
\def\titlefont#1{{\titlefonts\rmisbold #1}}
\def\chapfonts{%
\let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
% Markup style setup for left and right quotes.
\defmarkupstylesetup\markupsetuplq{%
- \expandafter\let\expandafter \temp
- \csname markupsetuplq\currentmarkupstyle\endcsname
+ \expandafter\let\expandafter \temp \csname markupsetuplq\currentmarkupstyle\endcsname
\ifx\temp\relax \markupsetuplqdefault \else \temp \fi
}
\defmarkupstylesetup\markupsetuprq{%
- \expandafter\let\expandafter \temp
- \csname markupsetuprq\currentmarkupstyle\endcsname
+ \expandafter\let\expandafter \temp \csname markupsetuprq\currentmarkupstyle\endcsname
\ifx\temp\relax \markupsetuprqdefault \else \temp \fi
}
\let\markupsetuplqcode \markupsetcodequoteleft
\let\markupsetuprqcode \markupsetcodequoteright
-%
\let\markupsetuplqexample \markupsetcodequoteleft
\let\markupsetuprqexample \markupsetcodequoteright
-%
-\let\markupsetuplqsamp \markupsetcodequoteleft
-\let\markupsetuprqsamp \markupsetcodequoteright
-%
\let\markupsetuplqverb \markupsetcodequoteleft
\let\markupsetuprqverb \markupsetcodequoteright
-%
\let\markupsetuplqverbatim \markupsetcodequoteleft
\let\markupsetuprqverbatim \markupsetcodequoteright
+\let\markupsetuplqsamp \markupsetnoligaturesquoteleft
\let\markupsetuplqkbd \markupsetnoligaturesquoteleft
-% Allow an option to not use regular directed right quote/apostrophe
-% (char 0x27), but instead the undirected quote from cmtt (char 0x0d).
-% The undirected quote is ugly, so don't make it the default, but it
-% works for pasting with more pdf viewers (at least evince), the
-% lilypond developers report. xpdf does work with the regular 0x27.
+% Allow an option to not replace quotes with a regular directed right
+% quote/apostrophe (char 0x27), but instead use the undirected quote
+% from cmtt (char 0x0d). The undirected quote is ugly, so don't make it
+% the default, but it works for pasting with more pdf viewers (at least
+% evince), the lilypond developers report. xpdf does work with the
+% regular 0x27.
%
\def\codequoteright{%
\expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax
\else \char'22 \fi
}
-% Commands to set the quote options.
-%
-\parseargdef\codequoteundirected{%
- \def\temp{#1}%
- \ifx\temp\onword
- \expandafter\let\csname SETtxicodequoteundirected\endcsname
- = t%
- \else\ifx\temp\offword
- \expandafter\let\csname SETtxicodequoteundirected\endcsname
- = \relax
- \else
- \errhelp = \EMsimple
- \errmessage{Unknown @codequoteundirected value `\temp', must be on|off}%
- \fi\fi
-}
-%
-\parseargdef\codequotebacktick{%
- \def\temp{#1}%
- \ifx\temp\onword
- \expandafter\let\csname SETtxicodequotebacktick\endcsname
- = t%
- \else\ifx\temp\offword
- \expandafter\let\csname SETtxicodequotebacktick\endcsname
- = \relax
- \else
- \errhelp = \EMsimple
- \errmessage{Unknown @codequotebacktick value `\temp', must be on|off}%
- \fi\fi
-}
-
% [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font.
\def\noligaturesquoteleft{\relax\lq}
% Count depth in font-changes, for error checks
\newcount\fontdepth \fontdepth=0
-% Font commands.
+%% Add scribe-like font environments, plus @l for inline lisp (usually sans
+%% serif) and @ii for TeX italic
-% #1 is the font command (\sl or \it), #2 is the text to slant.
-% If we are in a monospaced environment, however, 1) always use \ttsl,
-% and 2) do not add an italic correction.
-\def\dosmartslant#1#2{%
- \ifusingtt
- {{\ttsl #2}\let\next=\relax}%
- {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}%
- \next
-}
-\def\smartslanted{\dosmartslant\sl}
-\def\smartitalic{\dosmartslant\it}
+% \smartitalic{ARG} outputs arg in italics, followed by an italic correction
+% unless the following character is such as not to need one.
+\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else
+ \ptexslash\fi\fi\fi}
+\def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx}
+\def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx}
-% Output an italic correction unless \next (presumed to be the following
-% character) is such as not to need one.
-\def\smartitaliccorrection{%
- \ifx\next,%
- \else\ifx\next-%
- \else\ifx\next.%
- \else\ptexslash
- \fi\fi\fi
- \aftersmartic
-}
-
-% like \smartslanted except unconditionally uses \ttsl, and no ic.
+% like \smartslanted except unconditionally uses \ttsl.
% @var is set to this for defun arguments.
-\def\ttslanted#1{{\ttsl #1}}
+\def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx}
% @cite is like \smartslanted except unconditionally use \sl. We never want
% ttsl for book titles, do we?
-\def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection}
-
-\def\aftersmartic{}
-\def\var#1{%
- \let\saveaftersmartic = \aftersmartic
- \def\aftersmartic{\null\let\aftersmartic=\saveaftersmartic}%
- \smartslanted{#1}%
-}
+\def\cite#1{{\sl #1}\futurelet\next\smartitalicx}
\let\i=\smartitalic
\let\slanted=\smartslanted
+\def\var#1{{\setupmarkupstyle{var}\smartslanted{#1}}}
\let\dfn=\smartslanted
\let\emph=\smartitalic
\plainfrenchspacing
#1%
}%
- \null % reset spacefactor to 1000
+ \null
}
% We *must* turn on hyphenation at `-' and `_' in @code.
}
}
-\def\codex #1{\tclose{#1}\endgroup}
-
\def\realdash{-}
\def\codedash{-\discretionary{}{}{}}
\def\codeunder{%
\discretionary{}{}{}}%
{\_}%
}
+\def\codex #1{\tclose{#1}\endgroup}
% An additional complication: the above will allow breaks after, e.g.,
% each of the four underscores in __typeof__. This is undesirable in
\allowcodebreaksfalse
\else
\errhelp = \EMsimple
- \errmessage{Unknown @allowcodebreaks option `\txiarg', must be true|false}%
+ \errmessage{Unknown @allowcodebreaks option `\txiarg'}%
\fi\fi
}
-% @uref (abbreviation for `urlref') takes an optional (comma-separated)
-% second argument specifying the text to display and an optional third
-% arg as text to display instead of (rather than in addition to) the url
-% itself. First (mandatory) arg is the url.
-% (This \urefnobreak definition isn't used now, leaving it for a while
-% for comparison.)
-\def\urefnobreak#1{\dourefnobreak #1,,,\finish}
-\def\dourefnobreak#1,#2,#3,#4\finish{\begingroup
- \unsepspaces
- \pdfurl{#1}%
- \setbox0 = \hbox{\ignorespaces #3}%
- \ifdim\wd0 > 0pt
- \unhbox0 % third arg given, show only that
- \else
- \setbox0 = \hbox{\ignorespaces #2}%
- \ifdim\wd0 > 0pt
- \ifpdf
- \unhbox0 % PDF: 2nd arg given, show only it
- \else
- \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url
- \fi
- \else
- \code{#1}% only url given, so show it
- \fi
- \fi
- \endlink
-\endgroup}
-
-% This \urefbreak definition is the active one.
-\def\urefbreak{\begingroup \urefcatcodes \dourefbreak}
-\let\uref=\urefbreak
-\def\dourefbreak#1{\urefbreakfinish #1,,,\finish}
-\def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example
- \unsepspaces
- \pdfurl{#1}%
- \setbox0 = \hbox{\ignorespaces #3}%
- \ifdim\wd0 > 0pt
- \unhbox0 % third arg given, show only that
- \else
- \setbox0 = \hbox{\ignorespaces #2}%
- \ifdim\wd0 > 0pt
- \ifpdf
- \unhbox0 % PDF: 2nd arg given, show only it
- \else
- \unhbox0\ (\urefcode{#1})% DVI: 2nd arg given, show both it and url
- \fi
- \else
- \urefcode{#1}% only url given, so show it
- \fi
- \fi
- \endlink
-\endgroup}
-
-% Allow line breaks around only a few characters (only).
-\def\urefcatcodes{%
- \catcode\ampChar=\active \catcode\dotChar=\active
- \catcode\hashChar=\active \catcode\questChar=\active
- \catcode\slashChar=\active
-}
-{
- \urefcatcodes
- %
- \global\def\urefcode{\begingroup
- \setupmarkupstyle{code}%
- \urefcatcodes
- \let&\urefcodeamp
- \let.\urefcodedot
- \let#\urefcodehash
- \let?\urefcodequest
- \let/\urefcodeslash
- \codex
- }
- %
- % By default, they are just regular characters.
- \global\def&{\normalamp}
- \global\def.{\normaldot}
- \global\def#{\normalhash}
- \global\def?{\normalquest}
- \global\def/{\normalslash}
-}
-
-% we put a little stretch before and after the breakable chars, to help
-% line breaking of long url's. The unequal skips make look better in
-% cmtt at least, especially for dots.
-\def\urefprestretch{\urefprebreak \hskip0pt plus.13em }
-\def\urefpoststretch{\urefpostbreak \hskip0pt plus.1em }
-%
-\def\urefcodeamp{\urefprestretch \&\urefpoststretch}
-\def\urefcodedot{\urefprestretch .\urefpoststretch}
-\def\urefcodehash{\urefprestretch \#\urefpoststretch}
-\def\urefcodequest{\urefprestretch ?\urefpoststretch}
-\def\urefcodeslash{\futurelet\next\urefcodeslashfinish}
-{
- \catcode`\/=\active
- \global\def\urefcodeslashfinish{%
- \urefprestretch \slashChar
- % Allow line break only after the final / in a sequence of
- % slashes, to avoid line break between the slashes in http://.
- \ifx\next/\else \urefpoststretch \fi
- }
-}
-
-% One more complication: by default we'll break after the special
-% characters, but some people like to break before the special chars, so
-% allow that. Also allow no breaking at all, for manual control.
-%
-\parseargdef\urefbreakstyle{%
- \def\txiarg{#1}%
- \ifx\txiarg\wordnone
- \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak}
- \else\ifx\txiarg\wordbefore
- \def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak}
- \else\ifx\txiarg\wordafter
- \def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak}
- \else
- \errhelp = \EMsimple
- \errmessage{Unknown @urefbreakstyle setting `\txiarg'}%
- \fi\fi\fi
-}
-\def\wordafter{after}
-\def\wordbefore{before}
-\def\wordnone{none}
-
-\urefbreakstyle after
-
-% @url synonym for @uref, since that's how everyone uses it.
-%
-\let\url=\uref
-
-% rms does not like angle brackets --karl, 17may97.
-% So now @email is just like @uref, unless we are pdf.
-%
-%\def\email#1{\angleleft{\tt #1}\angleright}
-\ifpdf
- \def\email#1{\doemail#1,,\finish}
- \def\doemail#1,#2,#3\finish{\begingroup
- \unsepspaces
- \pdfurl{mailto:#1}%
- \setbox0 = \hbox{\ignorespaces #2}%
- \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi
- \endlink
- \endgroup}
-\else
- \let\email=\uref
-\fi
-
% @kbd is like @code, except that if the argument is just one @key command,
% then @kbd has no effect.
\def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}}
\gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
\else
\errhelp = \EMsimple
- \errmessage{Unknown @kbdinputstyle setting `\txiarg'}%
+ \errmessage{Unknown @kbdinputstyle option `\txiarg'}%
\fi\fi\fi
}
\def\worddistinct{distinct}
\parseargdef\clickstyle{\def\click{#1}}
\def\click{\arrow}
-% Typeset a dimension, e.g., `in' or `pt'. The only reason for the
-% argument is to make the input look right: @dmn{pt} instead of @dmn{}pt.
-%
-\def\dmn#1{\thinspace #1}
-
-% @l was never documented to mean ``switch to the Lisp font'',
-% and it is not used as such in any manual I can find. We need it for
-% Polish suppressed-l. --karl, 22sep96.
-%\def\l#1{{\li #1}\null}
-
-% @acronym for "FBI", "NATO", and the like.
-% We print this one point size smaller, since it's intended for
-% all-uppercase.
-%
-\def\acronym#1{\doacronym #1,,\finish}
-\def\doacronym#1,#2,#3\finish{%
- {\selectfonts\lsize #1}%
- \def\temp{#2}%
- \ifx\temp\empty \else
- \space ({\unsepspaces \ignorespaces \temp \unskip})%
- \fi
- \null % reset \spacefactor=1000
-}
-
-% @abbr for "Comput. J." and the like.
-% No font change, but don't do end-of-sentence spacing.
+% @uref (abbreviation for `urlref') takes an optional (comma-separated)
+% second argument specifying the text to display and an optional third
+% arg as text to display instead of (rather than in addition to) the url
+% itself. First (mandatory) arg is the url. Perhaps eventually put in
+% a hypertex \special here.
%
-\def\abbr#1{\doabbr #1,,\finish}
-\def\doabbr#1,#2,#3\finish{%
- {\plainfrenchspacing #1}%
- \def\temp{#2}%
- \ifx\temp\empty \else
- \space ({\unsepspaces \ignorespaces \temp \unskip})%
+\def\uref#1{\douref #1,,,\finish}
+\def\douref#1,#2,#3,#4\finish{\begingroup
+ \unsepspaces
+ \pdfurl{#1}%
+ \setbox0 = \hbox{\ignorespaces #3}%
+ \ifdim\wd0 > 0pt
+ \unhbox0 % third arg given, show only that
+ \else
+ \setbox0 = \hbox{\ignorespaces #2}%
+ \ifdim\wd0 > 0pt
+ \ifpdf
+ \unhbox0 % PDF: 2nd arg given, show only it
+ \else
+ \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url
+ \fi
+ \else
+ \code{#1}% only url given, so show it
+ \fi
\fi
- \null % reset \spacefactor=1000
-}
-
-% @asis just yields its argument. Used with @table, for example.
-%
-\def\asis#1{#1}
-
-% @math outputs its argument in math mode.
-%
-% One complication: _ usually means subscripts, but it could also mean
-% an actual _ character, as in @math{@var{some_variable} + 1}. So make
-% _ active, and distinguish by seeing if the current family is \slfam,
-% which is what @var uses.
-{
- \catcode`\_ = \active
- \gdef\mathunderscore{%
- \catcode`\_=\active
- \def_{\ifnum\fam=\slfam \_\else\sb\fi}%
- }
-}
-% Another complication: we want \\ (and @\) to output a math (or tt) \.
-% FYI, plain.tex uses \\ as a temporary control sequence (for no
-% particular reason), but this is not advertised and we don't care.
-%
-% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
-\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
-%
-\def\math{%
- \tex
- \mathunderscore
- \let\\ = \mathbackslash
- \mathactive
- % make the texinfo accent commands work in math mode
- \let\"=\ddot
- \let\'=\acute
- \let\==\bar
- \let\^=\hat
- \let\`=\grave
- \let\u=\breve
- \let\v=\check
- \let\~=\tilde
- \let\dotaccent=\dot
- $\finishmath
-}
-\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex.
+ \endlink
+\endgroup}
-% Some active characters (such as <) are spaced differently in math.
-% We have to reset their definitions in case the @math was an argument
-% to a command which sets the catcodes (such as @item or @section).
+% @url synonym for @uref, since that's how everyone uses it.
%
-{
- \catcode`^ = \active
- \catcode`< = \active
- \catcode`> = \active
- \catcode`+ = \active
- \catcode`' = \active
- \gdef\mathactive{%
- \let^ = \ptexhat
- \let< = \ptexless
- \let> = \ptexgtr
- \let+ = \ptexplus
- \let' = \ptexquoteright
- }
-}
-
-% @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}.
-% Ignore unless FMTNAME == tex; then it is like @iftex and @tex,
-% except specified as a normal braced arg, so no newlines to worry about.
-%
-\def\outfmtnametex{tex}
-%
-\def\inlinefmt#1{\doinlinefmt #1,\finish}
-\def\doinlinefmt#1,#2,\finish{%
- \def\inlinefmtname{#1}%
- \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi
-}
-% For raw, must switch into @tex before parsing the argument, to avoid
-% setting catcodes prematurely. Doing it this way means that, for
-% example, @inlineraw{html, foo{bar} gets a parse error instead of being
-% ignored. But this isn't important because if people want a literal
-% *right* brace they would have to use a command anyway, so they may as
-% well use a command to get a left brace too. We could re-use the
-% delimiter character idea from \verb, but it seems like overkill.
-%
-\def\inlineraw{\tex \doinlineraw}
-\def\doinlineraw#1{\doinlinerawtwo #1,\finish}
-\def\doinlinerawtwo#1,#2,\finish{%
- \def\inlinerawname{#1}%
- \ifx\inlinerawname\outfmtnametex \ignorespaces #2\fi
- \endgroup % close group opened by \tex.
-}
-
-
-\message{glyphs,}
-% and logos.
-
-% @@ prints an @, as does @atchar{}.
-\def\@{\char64 }
-\let\atchar=\@
-
-% @{ @} @lbracechar{} @rbracechar{} all generate brace characters.
-% Unless we're in typewriter, use \ecfont because the CM text fonts do
-% not have braces, and we don't want to switch into math.
-\def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}}
-\def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}}
-\let\{=\mylbrace \let\lbracechar=\{
-\let\}=\myrbrace \let\rbracechar=\}
-\begingroup
- % Definitions to produce \{ and \} commands for indices,
- % and @{ and @} for the aux/toc files.
- \catcode`\{ = \other \catcode`\} = \other
- \catcode`\[ = 1 \catcode`\] = 2
- \catcode`\! = 0 \catcode`\\ = \other
- !gdef!lbracecmd[\{]%
- !gdef!rbracecmd[\}]%
- !gdef!lbraceatcmd[@{]%
- !gdef!rbraceatcmd[@}]%
-!endgroup
-
-% @comma{} to avoid , parsing problems.
-\let\comma = ,
-
-% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
-% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H.
-\let\, = \ptexc
-\let\dotaccent = \ptexdot
-\def\ringaccent#1{{\accent23 #1}}
-\let\tieaccent = \ptext
-\let\ubaraccent = \ptexb
-\let\udotaccent = \d
-
-% Other special characters: @questiondown @exclamdown @ordf @ordm
-% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
-\def\questiondown{?`}
-\def\exclamdown{!`}
-\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}}
-\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}}
-
-% Dotless i and dotless j, used for accents.
-\def\imacro{i}
-\def\jmacro{j}
-\def\dotless#1{%
- \def\temp{#1}%
- \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi
- \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi
- \else \errmessage{@dotless can be used only with i or j}%
- \fi\fi
-}
+\let\url=\uref
-% The \TeX{} logo, as in plain, but resetting the spacing so that a
-% period following counts as ending a sentence. (Idea found in latex.)
+% rms does not like angle brackets --karl, 17may97.
+% So now @email is just like @uref, unless we are pdf.
%
-\edef\TeX{\TeX \spacefactor=1000 }
+%\def\email#1{\angleleft{\tt #1}\angleright}
+\ifpdf
+ \def\email#1{\doemail#1,,\finish}
+ \def\doemail#1,#2,#3\finish{\begingroup
+ \unsepspaces
+ \pdfurl{mailto:#1}%
+ \setbox0 = \hbox{\ignorespaces #2}%
+ \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi
+ \endlink
+ \endgroup}
+\else
+ \let\email=\uref
+\fi
-% @LaTeX{} logo. Not quite the same results as the definition in
-% latex.ltx, since we use a different font for the raised A; it's most
-% convenient for us to use an explicitly smaller font, rather than using
-% the \scriptstyle font (since we don't reset \scriptstyle and
-% \scriptscriptstyle).
+% Typeset a dimension, e.g., `in' or `pt'. The only reason for the
+% argument is to make the input look right: @dmn{pt} instead of @dmn{}pt.
%
-\def\LaTeX{%
- L\kern-.36em
- {\setbox0=\hbox{T}%
- \vbox to \ht0{\hbox{%
- \ifx\textnominalsize\xwordpt
- % for 10pt running text, \lllsize (8pt) is too small for the A in LaTeX.
- % Revert to plain's \scriptsize, which is 7pt.
- \count255=\the\fam $\fam\count255 \scriptstyle A$%
- \else
- % For 11pt, we can use our lllsize.
- \selectfonts\lllsize A%
- \fi
- }%
- \vss
- }}%
- \kern-.15em
- \TeX
-}
+\def\dmn#1{\thinspace #1}
-% Some math mode symbols.
-\def\bullet{$\ptexbullet$}
-\def\geq{\ifmmode \ge\else $\ge$\fi}
-\def\leq{\ifmmode \le\else $\le$\fi}
-\def\minus{\ifmmode -\else $-$\fi}
+% @l was never documented to mean ``switch to the Lisp font'',
+% and it is not used as such in any manual I can find. We need it for
+% Polish suppressed-l. --karl, 22sep96.
+%\def\l#1{{\li #1}\null}
-% @dots{} outputs an ellipsis using the current font.
-% We do .5em per period so that it has the same spacing in the cm
-% typewriter fonts as three actual period characters; on the other hand,
-% in other typewriter fonts three periods are wider than 1.5em. So do
-% whichever is larger.
+% @acronym for "FBI", "NATO", and the like.
+% We print this one point size smaller, since it's intended for
+% all-uppercase.
%
-\def\dots{%
- \leavevmode
- \setbox0=\hbox{...}% get width of three periods
- \ifdim\wd0 > 1.5em
- \dimen0 = \wd0
- \else
- \dimen0 = 1.5em
+\def\acronym#1{\doacronym #1,,\finish}
+\def\doacronym#1,#2,#3\finish{%
+ {\selectfonts\lsize #1}%
+ \def\temp{#2}%
+ \ifx\temp\empty \else
+ \space ({\unsepspaces \ignorespaces \temp \unskip})%
\fi
- \hbox to \dimen0{%
- \hskip 0pt plus.25fil
- .\hskip 0pt plus1fil
- .\hskip 0pt plus1fil
- .\hskip 0pt plus.5fil
- }%
}
-% @enddots{} is an end-of-sentence ellipsis.
+% @abbr for "Comput. J." and the like.
+% No font change, but don't do end-of-sentence spacing.
%
-\def\enddots{%
- \dots
- \spacefactor=\endofsentencespacefactor
+\def\abbr#1{\doabbr #1,,\finish}
+\def\doabbr#1,#2,#3\finish{%
+ {\plainfrenchspacing #1}%
+ \def\temp{#2}%
+ \ifx\temp\empty \else
+ \space ({\unsepspaces \ignorespaces \temp \unskip})%
+ \fi
}
+
+\message{glyphs,}
+
% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
%
% Since these characters are used in examples, they should be an even number of
{\tentt \global\dimen0 = 3em}% Width of the box.
\dimen2 = .55pt % Thickness of rules
% The text. (`r' is open on the right, `e' somewhat less so on the left.)
-\setbox0 = \hbox{\kern-.75pt \reducedsf \putworderror\kern-1.5pt}
+\setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt}
%
\setbox\errorbox=\hbox to \dimen0{\hfil
\hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
% Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38
% so we'll define it if necessary.
%
-\ifx\Orb\thisisundefined
+\ifx\Orb\undefined
\def\Orb{\mathhexbox20D}
\fi
\newif\ifsetshortcontentsaftertitlepage
\let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue
-\parseargdef\shorttitlepage{%
- \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}%
- \endgroup\page\hbox{}\page}
+\parseargdef\shorttitlepage{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}%
+ \endgroup\page\hbox{}\page}
\envdef\titlepage{%
% Open one extra group, as we want to close it in the middle of \Etitlepage.
\finishedtitlepagetrue
}
-% Macros to be used within @titlepage:
+%%% Macros to be used within @titlepage:
\let\subtitlerm=\tenrm
\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}
}
-% Set up page headings and footings.
+%%% Set up page headings and footings.
\let\thispage=\folio
\def\headings #1 {\csname HEADINGS#1\endcsname}
-\def\headingsoff{% non-global headings elimination
- \evenheadline={\hfil}\evenfootline={\hfil}%
- \oddheadline={\hfil}\oddfootline={\hfil}%
-}
-
-\def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting
-\HEADINGSoff % it's the default
-
+\def\HEADINGSoff{%
+\global\evenheadline={\hfil} \global\evenfootline={\hfil}
+\global\oddheadline={\hfil} \global\oddfootline={\hfil}}
+\HEADINGSoff
% When we turn headings on, set the page number to 1.
% For double-sided printing, put current file name in lower left corner,
% chapter name on inside top of right hand pages, document
% This produces Day Month Year style of output.
% Only define if not already defined, in case a txi-??.tex file has set
% up a different format (e.g., txi-cs.tex does this).
-\ifx\today\thisisundefined
+\ifx\today\undefined
\def\today{%
\number\day\space
\ifcase\month
\begingroup
\advance\leftskip by-\tableindent
\advance\hsize by\tableindent
- \advance\rightskip by0pt plus1fil\relax
+ \advance\rightskip by0pt plus1fil
\leavevmode\unhbox0\par
\endgroup
%
\setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip
\global\advance\multitablelinespace by-\ht0
\fi
-% Test to see if parskip is larger than space between lines of
-% table. If not, do nothing.
-% If so, set to same dimension as multitablelinespace.
+%% Test to see if parskip is larger than space between lines of
+%% table. If not, do nothing.
+%% If so, set to same dimension as multitablelinespace.
\ifdim\multitableparskip>\multitablelinespace
\global\multitableparskip=\multitablelinespace
-\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller
- % than skip between lines in the table.
+\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
+ %% than skip between lines in the table.
\fi%
\ifdim\multitableparskip=0pt
\global\multitableparskip=\multitablelinespace
-\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller
- % than skip between lines in the table.
+\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
+ %% than skip between lines in the table.
\fi}
\def\@{@}% change to @@ when we switch to @ as escape char in index files.
\def\ {\realbackslash\space }%
%
- % Need these unexpandable (because we define \tt as a dummy)
- % definitions when @{ or @} appear in index entry text. Also, more
- % complicated, when \tex is in effect and \{ is a \delimiter again.
- % We can't use \lbracecmd and \rbracecmd because texindex assumes
- % braces and backslashes are used only as delimiters. Perhaps we
- % should define @lbrace and @rbrace commands a la @comma.
- \def\{{{\tt\char123}}%
- \def\}{{\tt\char125}}%
+ % Need these in case \tex is in effect and \{ is a \delimiter again.
+ % But can't use \lbracecmd and \rbracecmd because texindex assumes
+ % braces and backslashes are used only as delimiters.
+ \let\{ = \mylbrace
+ \let\} = \myrbrace
%
% I don't entirely understand this, but when an index entry is
% generated from a macro call, the \endinput which \scanmacro inserts
\def\commondummies{%
%
% \definedummyword defines \#1 as \string\#1\space, thus effectively
- % preventing its expansion. This is used only for control words,
+ % preventing its expansion. This is used only for control% words,
% not control letters, because the \space would be incorrect for
% control characters, but is needed to separate the control word
% from whatever follows.
\commondummiesnofonts
%
\definedummyletter\_%
- \definedummyletter\-%
%
% Non-English letters.
\definedummyword\AA
\definedummyword\TeX
%
% Assorted special characters.
- \definedummyword\arrow
\definedummyword\bullet
\definedummyword\comma
\definedummyword\copyright
\definedummyword\registeredsymbol
\definedummyword\dots
\definedummyword\enddots
- \definedummyword\entrybreak
\definedummyword\equiv
\definedummyword\error
\definedummyword\euro
- \definedummyword\expansion
- \definedummyword\geq
\definedummyword\guillemetleft
\definedummyword\guillemetright
\definedummyword\guilsinglleft
\definedummyword\guilsinglright
- \definedummyword\leq
+ \definedummyword\expansion
\definedummyword\minus
\definedummyword\ogonek
\definedummyword\pounds
\definedummyword\b
\definedummyword\i
\definedummyword\r
- \definedummyword\sansserif
\definedummyword\sc
- \definedummyword\slanted
\definedummyword\t
%
% Commands that take arguments.
\definedummyword\acronym
- \definedummyword\anchor
\definedummyword\cite
\definedummyword\code
\definedummyword\command
\definedummyword\dfn
- \definedummyword\dmn
\definedummyword\email
\definedummyword\emph
\definedummyword\env
\definedummyword\file
- \definedummyword\indicateurl
\definedummyword\kbd
\definedummyword\key
\definedummyword\math
\def\definedummyaccent##1{\let##1\asis}%
% We can just ignore other control letters.
\def\definedummyletter##1{\let##1\empty}%
- % All control words become @asis by default; overrides below.
+ % Hopefully, all control words can become @asis.
\let\definedummyword\definedummyaccent
%
\commondummiesnofonts
%
\def\ { }%
\def\@{@}%
+ % how to handle braces?
\def\_{\normalunderscore}%
- \def\-{}% @- shouldn't affect sorting
- %
- % Unfortunately, texindex is not prepared to handle braces in the
- % content at all. So for index sorting, we map @{ and @} to strings
- % starting with |, since that ASCII character is between ASCII { and }.
- \def\{{|a}%
- \def\}{|b}%
%
% Non-English letters.
\def\AA{AA}%
%
% Assorted special characters.
% (The following {} will end up in the sort string, but that's ok.)
- \def\arrow{->}%
\def\bullet{bullet}%
\def\comma{,}%
\def\copyright{copyright}%
\def\error{error}%
\def\euro{euro}%
\def\expansion{==>}%
- \def\geq{>=}%
\def\guillemetleft{<<}%
\def\guillemetright{>>}%
\def\guilsinglleft{<}%
\def\guilsinglright{>}%
- \def\leq{<=}%
\def\minus{-}%
\def\point{.}%
\def\pounds{pounds}%
\def\result{=>}%
\def\textdegree{o}%
%
- \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax
- \else \indexlquoteignore \fi
- %
% We need to get rid of all macros, leaving only the arguments (if present).
% Of course this is not nearly correct, but it is the best we can do for now.
% makeinfo does not expand macros in the argument to @deffn, which ends up
\macrolist
}
-% Undocumented (for FSFS 2nd ed.): @set txiindexlquoteignore makes us
-% ignore left quotes in the sort term.
-{\catcode`\`=\active
- \gdef\indexlquoteignore{\let`=\empty}}
-
\let\indexbackslash=0 %overridden during \printindex.
\let\SETmarginindex=\relax % put index entries in margin (undocumented)?
% But this freezes the catcodes in the argument, and can cause problems to
% @code, which sets - active. This problem was fixed by a kludge---
% ``-'' was active throughout whole index, but this isn't really right.
+%
% The right solution is to prevent \entry from swallowing the whole text.
% --kasal, 21nov03
\def\entry{%
% columns.
\vskip 0pt plus1pt
%
- % When reading the text of entry, convert explicit line breaks
- % from @* into spaces. The user might give these in long section
- % titles, for instance.
- \def\*{\unskip\space\ignorespaces}%
- \def\entrybreak{\hfil\break}%
- %
% Swallow the left brace of the text (first parameter):
\afterassignment\doentry
\let\temp =
}
-\def\entrybreak{\unskip\space\ignorespaces}%
\def\doentry{%
\bgroup % Instead of the swallowed brace.
\noindent
\message{sectioning,}
% Chapters, sections, etc.
-% Let's start with @part.
-\outer\parseargdef\part{\partzzz{#1}}
-\def\partzzz#1{%
- \chapoddpage
- \null
- \vskip.3\vsize % move it down on the page a bit
- \begingroup
- \noindent \titlefonts\rmisbold #1\par % the text
- \let\lastnode=\empty % no node to associate with
- \writetocentry{part}{#1}{}% but put it in the toc
- \headingsoff % no headline or footline on the part page
- \chapoddpage
- \endgroup
-}
-
-% \unnumberedno is an oxymoron. But we count the unnumbered
+% \unnumberedno is an oxymoron, of course. But we count the unnumbered
% sections so that we can refer to them unambiguously in the pdf
% outlines by their "section number". We avoid collisions with chapter
% numbers by starting them at 10000. (If a document ever has 10000
\chardef\maxseclevel = 3
%
% A numbered section within an unnumbered changes to unnumbered too.
-% To achieve this, remember the "biggest" unnum. sec. we are currently in:
-\chardef\unnlevel = \maxseclevel
+% To achive this, remember the "biggest" unnum. sec. we are currently in:
+\chardef\unmlevel = \maxseclevel
%
% Trace whether the current chapter is an appendix or not:
% \chapheadtype is "N" or "A", unnumbered chapters are ignored.
% The heading type:
\def\headtype{#1}%
\if \headtype U%
- \ifnum \absseclevel < \unnlevel
- \chardef\unnlevel = \absseclevel
+ \ifnum \absseclevel < \unmlevel
+ \chardef\unmlevel = \absseclevel
\fi
\else
% Check for appendix sections:
\fi\fi
\fi
% Check for numbered within unnumbered:
- \ifnum \absseclevel > \unnlevel
+ \ifnum \absseclevel > \unmlevel
\def\headtype{U}%
\else
- \chardef\unnlevel = 3
+ \chardef\unmlevel = 3
\fi
\fi
% Now print the heading:
\global\let\subsubsection = \appendixsubsubsec
}
-% normally unnmhead0 calls unnumberedzzz:
-\outer\parseargdef\unnumbered{\unnmhead0{#1}}
+\outer\parseargdef\unnumbered{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz
\def\unnumberedzzz#1{%
\global\secno=0 \global\subsecno=0 \global\subsubsecno=0
\global\advance\unnumberedno by 1
\let\top\unnumbered
% Sections.
-%
\outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz
\def\seczzz#1{%
\global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
\sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}%
}
-% normally calls appendixsectionzzz:
-\outer\parseargdef\appendixsection{\apphead1{#1}}
+\outer\parseargdef\appendixsection{\apphead1{#1}} % normally calls appendixsectionzzz
\def\appendixsectionzzz#1{%
\global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
\sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}%
}
\let\appendixsec\appendixsection
-% normally calls unnumberedseczzz:
-\outer\parseargdef\unnumberedsec{\unnmhead1{#1}}
+\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} % normally calls unnumberedseczzz
\def\unnumberedseczzz#1{%
\global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
\sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}%
}
% Subsections.
-%
-% normally calls numberedsubseczzz:
-\outer\parseargdef\numberedsubsec{\numhead2{#1}}
+\outer\parseargdef\numberedsubsec{\numhead2{#1}} % normally calls numberedsubseczzz
\def\numberedsubseczzz#1{%
\global\subsubsecno=0 \global\advance\subsecno by 1
\sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}%
}
-% normally calls appendixsubseczzz:
-\outer\parseargdef\appendixsubsec{\apphead2{#1}}
+\outer\parseargdef\appendixsubsec{\apphead2{#1}} % normally calls appendixsubseczzz
\def\appendixsubseczzz#1{%
\global\subsubsecno=0 \global\advance\subsecno by 1
\sectionheading{#1}{subsec}{Yappendix}%
{\appendixletter.\the\secno.\the\subsecno}%
}
-% normally calls unnumberedsubseczzz:
-\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}}
+\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} %normally calls unnumberedsubseczzz
\def\unnumberedsubseczzz#1{%
\global\subsubsecno=0 \global\advance\subsecno by 1
\sectionheading{#1}{subsec}{Ynothing}%
}
% Subsubsections.
-%
-% normally numberedsubsubseczzz:
-\outer\parseargdef\numberedsubsubsec{\numhead3{#1}}
+\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} % normally numberedsubsubseczzz
\def\numberedsubsubseczzz#1{%
\global\advance\subsubsecno by 1
\sectionheading{#1}{subsubsec}{Ynumbered}%
{\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}%
}
-% normally appendixsubsubseczzz:
-\outer\parseargdef\appendixsubsubsec{\apphead3{#1}}
+\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} % normally appendixsubsubseczzz
\def\appendixsubsubseczzz#1{%
\global\advance\subsubsecno by 1
\sectionheading{#1}{subsubsec}{Yappendix}%
{\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}%
}
-% normally unnumberedsubsubseczzz:
-\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}}
+\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} %normally unnumberedsubsubseczzz
\def\unnumberedsubsubseczzz#1{%
\global\advance\subsubsecno by 1
\sectionheading{#1}{subsubsec}{Ynothing}%
% (including whitespace, linebreaking, etc. around it),
% given all the information in convenient, parsed form.
-% Args are the skip and penalty (usually negative)
+%%% Args are the skip and penalty (usually negative)
\def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi}
+%%% Define plain chapter starts, and page on/off switching for it
% Parameter controlling skip before chapter headings (if needed)
+
\newskip\chapheadingskip
-% Define plain chapter starts, and page on/off switching for it.
\def\chapbreak{\dobreak \chapheadingskip {-4000}}
\def\chappager{\par\vfill\supereject}
% Because \domark is called before \chapoddpage, the filler page will
\chappager
\ifodd\pageno \else
\begingroup
- \headingsoff
- \null
+ \evenheadline={\hfil}\evenfootline={\hfil}%
+ \oddheadline={\hfil}\oddfootline={\hfil}%
+ \hbox to 0pt{}%
\chappager
\endgroup
\fi
%
\def\sectionheading#1#2#3#4{%
{%
- \checkenv{}% should not be in an environment.
- %
% Switch to the right set of fonts.
\csname #2fonts\endcsname \rmisbold
%
% This is purely so the last item on the list is a known \penalty >
% 10000. This is so \startdefun can avoid allowing breakpoints after
% section headings. Otherwise, it would insert a valid breakpoint between:
+ %
% @section sec-whatever
% @deffn def-whatever
\penalty 10001
\def\summarycontents{%
\startcontents{\putwordShortTOC}%
%
- \let\partentry = \shortpartentry
\let\numchapentry = \shortchapentry
\let\appentry = \shortchapentry
\let\unnchapentry = \shortunnchapentry
% The last argument is the page number.
% The arguments in between are the chapter number, section number, ...
-% Parts, in the main contents. Replace the part number, which doesn't
-% exist, with an empty box. Let's hope all the numbers have the same width.
-% Also ignore the page number, which is conventionally not printed.
-\def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}}
-\def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}}
-%
-% Parts, in the short toc.
-\def\shortpartentry#1#2#3#4{%
- \penalty-300
- \vskip.5\baselineskip plus.15\baselineskip minus.1\baselineskip
- \shortchapentry{{\bf #1}}{\numeralbox}{}{}%
-}
-
% Chapters, in the main contents.
\def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}}
%
\message{environments,}
% @foo ... @end foo.
-% @tex ... @end tex escapes into raw TeX temporarily.
+% @tex ... @end tex escapes into raw Tex temporarily.
% One exception: @ is still an escape character, so that @end tex works.
-% But \@ or @@ will get a plain @ character.
+% But \@ or @@ will get a plain tex @ character.
\envdef\tex{%
\setupmarkupstyle{tex}%
\catcode`\'=\other
\escapechar=`\\
%
- % ' is active in math mode (mathcode"8000). So reset it, and all our
- % other math active characters (just in case), to plain's definitions.
- \mathactive
- %
\let\b=\ptexb
\let\bullet=\ptexbullet
\let\c=\ptexc
\normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
% Flag to tell @lisp, etc., not to narrow margin.
\let\nonarrowing = t%
- %
- % If this cartouche directly follows a sectioning command, we need the
- % \parskip glue (backspaced over by default) or the cartouche can
- % collide with the section heading.
- \ifnum\lastpenalty>10000 \vskip\parskip \fi
- %
\vbox\bgroup
\baselineskip=0pt\parskip=0pt\lineskip=0pt
\carttop
\lineskip=\normlskip
\parskip=\normpskip
\vskip -\parskip
- \comment % For explanation, see the end of def\group.
+ \comment % For explanation, see the end of \def\group.
}
\def\Ecartouche{%
\ifhmode\par\fi
}
% We often define two environments, @foo and @smallfoo.
-% Let's do it in one command. #1 is the env name, #2 the definition.
-\def\makedispenvdef#1#2{%
- \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}%
- \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}%
+% Let's do it by one command:
+\def\makedispenv #1#2{
+ \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}
+ \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}
\expandafter\let\csname E#1\endcsname \afterenvbreak
\expandafter\let\csname Esmall#1\endcsname \afterenvbreak
}
-% Define two environment synonyms (#1 and #2) for an environment.
-\def\maketwodispenvdef#1#2#3{%
- \makedispenvdef{#1}{#3}%
- \makedispenvdef{#2}{#3}%
+% Define two synonyms:
+\def\maketwodispenvs #1#2#3{
+ \makedispenv{#1}{#3}
+ \makedispenv{#2}{#3}
}
-%
-% @lisp: indented, narrowed, typewriter font;
-% @example: same as @lisp.
+
+% @lisp: indented, narrowed, typewriter font; @example: same as @lisp.
%
% @smallexample and @smalllisp: use smaller fonts.
% Originally contributed by Pavel@xerox.
%
-\maketwodispenvdef{lisp}{example}{%
+\maketwodispenvs {lisp}{example}{%
\nonfillstart
\tt\setupmarkupstyle{example}%
\let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
- \gobble % eat return
+ \gobble % eat return
}
% @display/@smalldisplay: same as @lisp except keep current font.
%
-\makedispenvdef{display}{%
+\makedispenv {display}{%
\nonfillstart
\gobble
}
% @format/@smallformat: same as @display except don't narrow margins.
%
-\makedispenvdef{format}{%
+\makedispenv{format}{%
\let\nonarrowing = t%
\nonfillstart
\gobble
\envdef\flushright{%
\let\nonarrowing = t%
\nonfillstart
- \advance\leftskip by 0pt plus 1fill\relax
+ \advance\leftskip by 0pt plus 1fill
\gobble
}
\let\Eflushright = \afterenvbreak
% we're doing normal filling. So, when using \aboveenvbreak and
% \afterenvbreak, temporarily make \parskip 0.
%
-\makedispenvdef{quotation}{\quotationstart}
-%
\def\quotationstart{%
{\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
\parindent=0pt
\parsearg\quotationlabel
}
+\envdef\quotation{%
+ \setnormaldispenv
+ \quotationstart
+}
+
+\envdef\smallquotation{%
+ \setsmalldispenv
+ \quotationstart
+}
+\let\Esmallquotation = \Equotation
+
% We have retained a nonzero parskip for the environment, since we're
% doing normal filling.
%
\def\Equotation{%
\par
- \ifx\quotationauthor\thisisundefined\else
+ \ifx\quotationauthor\undefined\else
% indent a bit.
\leftline{\kern 2\leftskip \sl ---\quotationauthor}%
\fi
{\parskip=0pt \afterenvbreak}%
}
-\def\Esmallquotation{\Equotation}
% If we're given an argument, typeset it in bold with a colon after.
\def\quotationlabel#1{%
% Setup for the @verbatim environment
%
-% Real tab expansion.
+% Real tab expansion
\newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount
%
-% We typeset each line of the verbatim in an \hbox, so we can handle
-% tabs. The \global is in case the verbatim line starts with an accent,
-% or some other command that starts with a begin-group. Otherwise, the
-% entire \verbbox would disappear at the corresponding end-group, before
-% it is typeset. Meanwhile, we can't have nested verbatim commands
-% (can we?), so the \global won't be overwriting itself.
-\newbox\verbbox
-\def\starttabbox{\global\setbox\verbbox=\hbox\bgroup}
+\def\starttabbox{\setbox0=\hbox\bgroup}
%
\begingroup
\catcode`\^^I=\active
\gdef\tabexpand{%
\catcode`\^^I=\active
\def^^I{\leavevmode\egroup
- \dimen\verbbox=\wd\verbbox % the width so far, or since the previous tab
- \divide\dimen\verbbox by\tabw
- \multiply\dimen\verbbox by\tabw % compute previous multiple of \tabw
- \advance\dimen\verbbox by\tabw % advance to next multiple of \tabw
- \wd\verbbox=\dimen\verbbox \box\verbbox \starttabbox
+ \dimen0=\wd0 % the width so far, or since the previous tab
+ \divide\dimen0 by\tabw
+ \multiply\dimen0 by\tabw % compute previous multiple of \tabw
+ \advance\dimen0 by\tabw % advance to next multiple of \tabw
+ \wd0=\dimen0 \box0 \starttabbox
}%
}
\endgroup
\def\setupverbatim{%
\let\nonarrowing = t%
\nonfillstart
- \tt % easiest (and conventionally used) font for verbatim
- % The \leavevmode here is for blank lines. Otherwise, we would
- % never \starttabox and the \egroup would end verbatim mode.
- \def\par{\leavevmode\egroup\box\verbbox\endgraf}%
+ % Easiest (and conventionally used) font for verbatim
+ \tt
+ \def\par{\leavevmode\egroup\box0\endgraf}%
\tabexpand
\setupmarkupstyle{verbatim}%
% Respect line breaks,
% print special symbols as themselves, and
- % make each space count.
- % Must do in this order:
+ % make each space count
+ % must do in this order:
\obeylines \uncatcodespecials \sepspaces
\everypar{\starttabbox}%
}
\makevalueexpandable
\setupverbatim
\indexnofonts % Allow `@@' and other weird things in file names.
- \wlog{texinfo.tex: doing @verbatiminclude of #1^^J}%
\input #1
\afterenvbreak
}%
% commands also insert a nobreak penalty, and we don't want to allow
% a break between a section heading and a defun.
%
- % As a further refinement, we avoid "club" headers by signalling
+ % As a minor refinement, we avoid "club" headers by signalling
% with penalty of 10003 after the very first @deffn in the
% sequence (see above), and penalty of 10002 after any following
% @def command.
#1#2 \endheader
% common ending:
\interlinepenalty = 10000
- \advance\rightskip by 0pt plus 1fil\relax
+ \advance\rightskip by 0pt plus 1fil
\endgraf
\nobreak\vskip -\parskip
\penalty\defunpenalty % signal to \startdefun and \dodefunx
\def\domakedefun#1#2#3{%
\envdef#1{%
\startdefun
- \doingtypefnfalse % distinguish typed functions from all else
\parseargusing\activeparens{\printdefunline#3}%
}%
\def#2{\dodefunx#1}%
\def#3%
}
-\newif\ifdoingtypefn % doing typed function?
-\newif\ifrettypeownline % typeset return type on its own line?
-
-% @deftypefnnewline on|off says whether the return type of typed functions
-% are printed on their own line. This affects @deftypefn, @deftypefun,
-% @deftypeop, and @deftypemethod.
-%
-\parseargdef\deftypefnnewline{%
- \def\temp{#1}%
- \ifx\temp\onword
- \expandafter\let\csname SETtxideftypefnnl\endcsname
- = \empty
- \else\ifx\temp\offword
- \expandafter\let\csname SETtxideftypefnnl\endcsname
- = \relax
- \else
- \errhelp = \EMsimple
- \errmessage{Unknown @txideftypefnnl value `\temp',
- must be on|off}%
- \fi\fi
-}
-
-% Untyped functions:
+%%% Untyped functions:
% @deffn category name args
\makedefun{deffn}{\deffngeneral{}}
\defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}%
}
-% Typed functions:
+%%% Typed functions:
% @deftypefn category type name args
\makedefun{deftypefn}{\deftypefngeneral{}}
%
\def\deftypefngeneral#1#2 #3 #4 #5\endheader{%
\dosubind{fn}{\code{#4}}{#1}%
- \doingtypefntrue
\defname{#2}{#3}{#4}\defunargs{#5\unskip}%
}
-% Typed variables:
+%%% Typed variables:
% @deftypevr category type var args
\makedefun{deftypevr}{\deftypecvgeneral{}}
\defname{#2}{#3}{#4}\defunargs{#5\unskip}%
}
-% Untyped variables:
+%%% Untyped variables:
% @defvr category var args
\makedefun{defvr}#1 {\deftypevrheader{#1} {} }
% \defcvof {category of}class var args
\def\defcvof#1#2 {\deftypecvof{#1}#2 {} }
-% Types:
-
+%%% Type:
% @deftp category name args
\makedefun{deftp}#1 #2 #3\endheader{%
\doind{tp}{\code{#2}}%
% We are followed by (but not passed) the arguments, if any.
%
\def\defname#1#2#3{%
- \par
% Get the values of \leftskip and \rightskip as they were outside the @def...
\advance\leftskip by -\defbodyindent
%
- % Determine if we are typesetting the return type of a typed function
- % on a line by itself.
- \rettypeownlinefalse
- \ifdoingtypefn % doing a typed function specifically?
- % then check user option for putting return type on its own line:
- \expandafter\ifx\csname SETtxideftypefnnl\endcsname\relax \else
- \rettypeownlinetrue
- \fi
- \fi
- %
- % How we'll format the category name. Putting it in brackets helps
+ % How we'll format the type name. Putting it in brackets helps
% distinguish it from the body text that may end up on the next line
% just below it.
\def\temp{#1}%
\setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi}
%
- % Figure out line sizes for the paragraph shape. We'll always have at
- % least two.
- \tempnum = 2
- %
+ % Figure out line sizes for the paragraph shape.
% The first line needs space for \box0; but if \rightskip is nonzero,
% we need only space for the part of \box0 which exceeds it:
\dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip
- %
- % If doing a return type on its own line, we'll have another line.
- \ifrettypeownline
- \advance\tempnum by 1
- \def\maybeshapeline{0in \hsize}%
- \else
- \def\maybeshapeline{}%
- \fi
- %
% The continuations:
\dimen2=\hsize \advance\dimen2 by -\defargsindent
+ % (plain.tex says that \dimen1 should be used only as global.)
+ \parshape 2 0in \dimen0 \defargsindent \dimen2
%
- % The final paragraph shape:
- \parshape \tempnum 0in \dimen0 \maybeshapeline \defargsindent \dimen2
- %
- % Put the category name at the right margin.
+ % Put the type name to the right margin.
\noindent
\hbox to 0pt{%
\hfil\box0 \kern-\hsize
% . this still does not fix the ?` and !` ligatures, but so far no
% one has made identifiers using them :).
\df \tt
- \def\temp{#2}% text of the return type
- \ifx\temp\empty\else
- \tclose{\temp}% typeset the return type
- \ifrettypeownline
- % put return type on its own line; prohibit line break following:
- \hfil\vadjust{\nobreak}\break
- \else
- \space % type on same line, so just followed by a space
- \fi
- \fi % no return type
+ \def\temp{#2}% return value type
+ \ifx\temp\empty\else \tclose{\temp} \fi
#3% output function name
}%
{\rm\enskip}% hskip 0.5 em of \tenrm
% To do this right we need a feature of e-TeX, \scantokens,
% which we arrange to emulate with a temporary file in ordinary TeX.
-\ifx\eTeXversion\thisisundefined
+\ifx\eTeXversion\undefined
\newwrite\macscribble
\def\scantokens#1{%
\toks0={#1}%
}
\fi
-\def\scanmacro#1{\begingroup
- \newlinechar`\^^M
- \let\xeatspaces\eatspaces
- %
- % Undo catcode changes of \startcontents and \doprintindex
- % When called from @insertcopying or (short)caption, we need active
- % backslash to get it printed correctly. Previously, we had
- % \catcode`\\=\other instead. We'll see whether a problem appears
- % with macro expansion. --kasal, 19aug04
- \catcode`\@=0 \catcode`\\=\active \escapechar=`\@
- %
- % ... and for \example:
- \spaceisspace
- %
- % The \empty here causes a following catcode 5 newline to be eaten as
- % part of reading whitespace after a control sequence. It does not
- % eat a catcode 13 newline. There's no good way to handle the two
- % cases (untried: maybe e-TeX's \everyeof could help, though plain TeX
- % would then have different behavior). See the Macro Details node in
- % the manual for the workaround we recommend for macros and
- % line-oriented commands.
- %
- \scantokens{#1\empty}%
-\endgroup}
+\def\scanmacro#1{%
+ \begingroup
+ \newlinechar`\^^M
+ \let\xeatspaces\eatspaces
+ % Undo catcode changes of \startcontents and \doprintindex
+ % When called from @insertcopying or (short)caption, we need active
+ % backslash to get it printed correctly. Previously, we had
+ % \catcode`\\=\other instead. We'll see whether a problem appears
+ % with macro expansion. --kasal, 19aug04
+ \catcode`\@=0 \catcode`\\=\active \escapechar=`\@
+ % ... and \example
+ \spaceisspace
+ %
+ % Append \endinput to make sure that TeX does not see the ending newline.
+ % I've verified that it is necessary both for e-TeX and for ordinary TeX
+ % --kasal, 29nov03
+ \scantokens{#1\endinput}%
+ \endgroup
+}
\def\scanexp#1{%
\edef\temp{\noexpand\scanmacro{#1}}%
% Macro bodies are absorbed as an argument in a context where
% all characters are catcode 10, 11 or 12, except \ which is active
-% (as in normal texinfo). It is necessary to change the definition of \
-% to recognize macro arguments; this is the job of \mbodybackslash.
-%
+% (as in normal texinfo). It is necessary to change the definition of \.
+
% Non-ASCII encodings make 8-bit characters active, so un-activate
% them to avoid their expansion. Must do this non-globally, to
% confine the change to the current group.
-%
+
% It's necessary to have hard CRs when the macro is executed. This is
-% done by making ^^M (\endlinechar) catcode 12 when reading the macro
+% done by making ^^M (\endlinechar) catcode 12 when reading the macro
% body, and then making it the \newlinechar in \scanmacro.
-%
-\def\scanctxt{% used as subroutine
+
+\def\scanctxt{%
\catcode`\"=\other
\catcode`\+=\other
\catcode`\<=\other
\ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi
}
-\def\scanargctxt{% used for copying and captions, not macros.
+\def\scanargctxt{%
\scanctxt
\catcode`\\=\other
\catcode`\^^M=\other
}
-\def\macrobodyctxt{% used for @macro definitions
+\def\macrobodyctxt{%
\scanctxt
\catcode`\{=\other
\catcode`\}=\other
\usembodybackslash
}
-\def\macroargctxt{% used when scanning invocations
+\def\macroargctxt{%
\scanctxt
- \catcode`\\=0
+ \catcode`\\=\other
}
-% why catcode 0 for \ in the above? To recognize \\ \{ \} as "escapes"
-% for the single characters \ { }. Thus, we end up with the "commands"
-% that would be written @\ @{ @} in a Texinfo document.
-%
-% We already have @{ and @}. For @\, we define it here, and only for
-% this purpose, to produce a typewriter backslash (so, the @\ that we
-% define for @math can't be used with @macro calls):
-%
-\def\\{\normalbackslash}%
-%
-% We would like to do this for \, too, since that is what makeinfo does.
-% But it is not possible, because Texinfo already has a command @, for a
-% cedilla accent. Documents must use @comma{} instead.
-%
-% \anythingelse will almost certainly be an error of some kind.
-
% \mbodybackslash is the definition of \ in @macro bodies.
% It maps \foo\ => \csname macarg.foo\endcsname => #N
% where N is the macro parameter number.
% We define \csname macarg.\endcsname to be \realbackslash, so
% \\ in macro replacement text gets you a backslash.
-%
+
{\catcode`@=0 @catcode`@\=@active
@gdef@usembodybackslash{@let\=@mbodybackslash}
@gdef@mbodybackslash#1\{@csname macarg.#1@endcsname}
}
\expandafter\def\csname macarg.\endcsname{\realbackslash}
-\def\margbackslash#1{\char`\#1 }
-
\def\macro{\recursivefalse\parsearg\macroxxx}
\def\rmacro{\recursivetrue\parsearg\macroxxx}
\def\macroxxx#1{%
- \getargs{#1}% now \macname is the macname and \argl the arglist
+ \getargs{#1}% now \macname is the macname and \argl the arglist
\ifx\argl\empty % no arguments
- \paramno=0\relax
+ \paramno=0%
\else
\expandafter\parsemargdef \argl;%
- \if\paramno>256\relax
- \ifx\eTeXversion\thisisundefined
- \errhelp = \EMsimple
- \errmessage{You need eTeX to compile a file with macros with more than 256 arguments}
- \fi
- \fi
\fi
\if1\csname ismacro.\the\macname\endcsname
\message{Warning: redefining \the\macname}%
% an opening brace, and that opening brace is not consumed.
\def\getargs#1{\getargsxxx#1{}}
\def\getargsxxx#1#{\getmacname #1 \relax\getmacargs}
-\def\getmacname#1 #2\relax{\macname={#1}}
+\def\getmacname #1 #2\relax{\macname={#1}}
\def\getmacargs#1{\def\argl{#1}}
-% For macro processing make @ a letter so that we can make Texinfo private macro names.
-\edef\texiatcatcode{\the\catcode`\@}
-\catcode `@=11\relax
-
% Parse the optional {params} list. Set up \paramno and \paramlist
-% so \defmacro knows what to do. Define \macarg.BLAH for each BLAH
-% in the params list to some hook where the argument si to be expanded. If
-% there are less than 10 arguments that hook is to be replaced by ##N where N
-% is the position in that list, that is to say the macro arguments are to be
-% defined `a la TeX in the macro body.
-%
+% so \defmacro knows what to do. Define \macarg.blah for each blah
+% in the params list, to be ##N where N is the position in that list.
% That gets used by \mbodybackslash (above).
-%
+
% We need to get `macro parameter char #' into several definitions.
-% The technique used is stolen from LaTeX: let \hash be something
+% The technique used is stolen from LaTeX: let \hash be something
% unexpandable, insert that wherever you need a #, and then redefine
% it to # just before using the token list produced.
%
% The same technique is used to protect \eatspaces till just before
% the macro is used.
-%
-% If there are 10 or more arguments, a different technique is used, where the
-% hook remains in the body, and when macro is to be expanded the body is
-% processed again to replace the arguments.
-%
-% In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the
-% argument N value and then \edef the body (nothing else will expand because of
-% the catcode regime underwhich the body was input).
-%
-% If you compile with TeX (not eTeX), and you have macros with 10 or more
-% arguments, you need that no macro has more than 256 arguments, otherwise an
-% error is produced.
-\def\parsemargdef#1;{%
- \paramno=0\def\paramlist{}%
- \let\hash\relax
- \let\xeatspaces\relax
- \parsemargdefxxx#1,;,%
- % In case that there are 10 or more arguments we parse again the arguments
- % list to set new definitions for the \macarg.BLAH macros corresponding to
- % each BLAH argument. It was anyhow needed to parse already once this list
- % in order to count the arguments, and as macros with at most 9 arguments
- % are by far more frequent than macro with 10 or more arguments, defining
- % twice the \macarg.BLAH macros does not cost too much processing power.
- \ifnum\paramno<10\relax\else
- \paramno0\relax
- \parsemmanyargdef@@#1,;,% 10 or more arguments
- \fi
-}
+
+\def\parsemargdef#1;{\paramno=0\def\paramlist{}%
+ \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,}
\def\parsemargdefxxx#1,{%
\if#1;\let\next=\relax
\else \let\next=\parsemargdefxxx
- \advance\paramno by 1
+ \advance\paramno by 1%
\expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
{\xeatspaces{\hash\the\paramno}}%
\edef\paramlist{\paramlist\hash\the\paramno,}%
\fi\next}
-\def\parsemmanyargdef@@#1,{%
- \if#1;\let\next=\relax
- \else
- \let\next=\parsemmanyargdef@@
- \edef\tempb{\eatspaces{#1}}%
- \expandafter\def\expandafter\tempa
- \expandafter{\csname macarg.\tempb\endcsname}%
- % Note that we need some extra \noexpand\noexpand, this is because we
- % don't want \the to be expanded in the \parsermacbody as it uses an
- % \xdef .
- \expandafter\edef\tempa
- {\noexpand\noexpand\noexpand\the\toks\the\paramno}%
- \advance\paramno by 1\relax
- \fi\next}
-
% These two commands read recursive and nonrecursive macro bodies.
% (They're different since rec and nonrec macros end differently.)
-%
-\catcode `\@\texiatcatcode
\long\def\parsemacbody#1@end macro%
{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
\long\def\parsermacbody#1@end rmacro%
{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
-\catcode `\@=11\relax
-
-\let\endargs@\relax
-\let\nil@\relax
-\def\nilm@{\nil@}%
-\long\def\nillm@{\nil@}%
-
-% This macro is expanded during the Texinfo macro expansion, not during its
-% definition. It gets all the arguments values and assigns them to macros
-% macarg.ARGNAME
-%
-% #1 is the macro name
-% #2 is the list of argument names
-% #3 is the list of argument values
-\def\getargvals@#1#2#3{%
- \def\macargdeflist@{}%
- \def\saveparamlist@{#2}% Need to keep a copy for parameter expansion.
- \def\paramlist{#2,\nil@}%
- \def\macroname{#1}%
- \begingroup
- \macroargctxt
- \def\argvaluelist{#3,\nil@}%
- \def\@tempa{#3}%
- \ifx\@tempa\empty
- \setemptyargvalues@
- \else
- \getargvals@@
- \fi
-}
-
-%
-\def\getargvals@@{%
- \ifx\paramlist\nilm@
- % Some sanity check needed here that \argvaluelist is also empty.
- \ifx\argvaluelist\nillm@
- \else
- \errhelp = \EMsimple
- \errmessage{Too many arguments in macro `\macroname'!}%
- \fi
- \let\next\macargexpandinbody@
- \else
- \ifx\argvaluelist\nillm@
- % No more arguments values passed to macro. Set remaining named-arg
- % macros to empty.
- \let\next\setemptyargvalues@
- \else
- % pop current arg name into \@tempb
- \def\@tempa##1{\pop@{\@tempb}{\paramlist}##1\endargs@}%
- \expandafter\@tempa\expandafter{\paramlist}%
- % pop current argument value into \@tempc
- \def\@tempa##1{\longpop@{\@tempc}{\argvaluelist}##1\endargs@}%
- \expandafter\@tempa\expandafter{\argvaluelist}%
- % Here \@tempb is the current arg name and \@tempc is the current arg value.
- % First place the new argument macro definition into \@tempd
- \expandafter\macname\expandafter{\@tempc}%
- \expandafter\let\csname macarg.\@tempb\endcsname\relax
- \expandafter\def\expandafter\@tempe\expandafter{%
- \csname macarg.\@tempb\endcsname}%
- \edef\@tempd{\long\def\@tempe{\the\macname}}%
- \push@\@tempd\macargdeflist@
- \let\next\getargvals@@
- \fi
- \fi
- \next
-}
-
-\def\push@#1#2{%
- \expandafter\expandafter\expandafter\def
- \expandafter\expandafter\expandafter#2%
- \expandafter\expandafter\expandafter{%
- \expandafter#1#2}%
-}
-
-% Replace arguments by their values in the macro body, and place the result
-% in macro \@tempa
-\def\macvalstoargs@{%
- % To do this we use the property that token registers that are \the'ed
- % within an \edef expand only once. So we are going to place all argument
- % values into respective token registers.
- %
- % First we save the token context, and initialize argument numbering.
- \begingroup
- \paramno0\relax
- % Then, for each argument number #N, we place the corresponding argument
- % value into a new token list register \toks#N
- \expandafter\putargsintokens@\saveparamlist@,;,%
- % Then, we expand the body so that argument are replaced by their
- % values. The trick for values not to be expanded themselves is that they
- % are within tokens and that tokens expand only once in an \edef .
- \edef\@tempc{\csname mac.\macroname .body\endcsname}%
- % Now we restore the token stack pointer to free the token list registers
- % which we have used, but we make sure that expanded body is saved after
- % group.
- \expandafter
- \endgroup
- \expandafter\def\expandafter\@tempa\expandafter{\@tempc}%
- }
-
-\def\macargexpandinbody@{%
- %% Define the named-macro outside of this group and then close this group.
- \expandafter
- \endgroup
- \macargdeflist@
- % First the replace in body the macro arguments by their values, the result
- % is in \@tempa .
- \macvalstoargs@
- % Then we point at the \norecurse or \gobble (for recursive) macro value
- % with \@tempb .
- \expandafter\let\expandafter\@tempb\csname mac.\macroname .recurse\endcsname
- % Depending on whether it is recursive or not, we need some tailing
- % \egroup .
- \ifx\@tempb\gobble
- \let\@tempc\relax
- \else
- \let\@tempc\egroup
- \fi
- % And now we do the real job:
- \edef\@tempd{\noexpand\@tempb{\macroname}\noexpand\scanmacro{\@tempa}\@tempc}%
- \@tempd
-}
-
-\def\putargsintokens@#1,{%
- \if#1;\let\next\relax
- \else
- \let\next\putargsintokens@
- % First we allocate the new token list register, and give it a temporary
- % alias \@tempb .
- \toksdef\@tempb\the\paramno
- % Then we place the argument value into that token list register.
- \expandafter\let\expandafter\@tempa\csname macarg.#1\endcsname
- \expandafter\@tempb\expandafter{\@tempa}%
- \advance\paramno by 1\relax
- \fi
- \next
-}
-
-% Save the token stack pointer into macro #1
-\def\texisavetoksstackpoint#1{\edef#1{\the\@cclvi}}
-% Restore the token stack pointer from number in macro #1
-\def\texirestoretoksstackpoint#1{\expandafter\mathchardef\expandafter\@cclvi#1\relax}
-% newtoks that can be used non \outer .
-\def\texinonouternewtoks{\alloc@ 5\toks \toksdef \@cclvi}
-
-% Tailing missing arguments are set to empty
-\def\setemptyargvalues@{%
- \ifx\paramlist\nilm@
- \let\next\macargexpandinbody@
- \else
- \expandafter\setemptyargvaluesparser@\paramlist\endargs@
- \let\next\setemptyargvalues@
- \fi
- \next
-}
-
-\def\setemptyargvaluesparser@#1,#2\endargs@{%
- \expandafter\def\expandafter\@tempa\expandafter{%
- \expandafter\def\csname macarg.#1\endcsname{}}%
- \push@\@tempa\macargdeflist@
- \def\paramlist{#2}%
-}
-
-% #1 is the element target macro
-% #2 is the list macro
-% #3,#4\endargs@ is the list value
-\def\pop@#1#2#3,#4\endargs@{%
- \def#1{#3}%
- \def#2{#4}%
-}
-\long\def\longpop@#1#2#3,#4\endargs@{%
- \long\def#1{#3}%
- \long\def#2{#4}%
-}
-% This defines a Texinfo @macro. There are eight cases: recursive and
-% nonrecursive macros of zero, one, up to nine, and many arguments.
+% This defines the macro itself. There are six cases: recursive and
+% nonrecursive macros of zero, one, and many arguments.
% Much magic with \expandafter here.
% \xdef is used so that macro definitions will survive the file
% they're defined in; @include reads the file inside a group.
-%
\def\defmacro{%
\let\hash=##% convert placeholders to macro parameter chars
\ifrecursive
\expandafter\noexpand\csname\the\macname xxx\endcsname}%
\expandafter\xdef\csname\the\macname xxx\endcsname##1{%
\egroup\noexpand\scanmacro{\temp}}%
- \else
- \ifnum\paramno<10\relax % at most 9
- \expandafter\xdef\csname\the\macname\endcsname{%
- \bgroup\noexpand\macroargctxt
- \noexpand\csname\the\macname xx\endcsname}%
- \expandafter\xdef\csname\the\macname xx\endcsname##1{%
- \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
- \expandafter\expandafter
- \expandafter\xdef
- \expandafter\expandafter
- \csname\the\macname xxx\endcsname
- \paramlist{\egroup\noexpand\scanmacro{\temp}}%
- \else % 10 or more
- \expandafter\xdef\csname\the\macname\endcsname{%
- \noexpand\getargvals@{\the\macname}{\argl}%
- }%
- \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp
- \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble
- \fi
+ \else % many
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \bgroup\noexpand\macroargctxt
+ \noexpand\csname\the\macname xx\endcsname}%
+ \expandafter\xdef\csname\the\macname xx\endcsname##1{%
+ \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
+ \expandafter\expandafter
+ \expandafter\xdef
+ \expandafter\expandafter
+ \csname\the\macname xxx\endcsname
+ \paramlist{\egroup\noexpand\scanmacro{\temp}}%
\fi
\else
\ifcase\paramno
\egroup
\noexpand\norecurse{\the\macname}%
\noexpand\scanmacro{\temp}\egroup}%
- \else % at most 9
- \ifnum\paramno<10\relax
- \expandafter\xdef\csname\the\macname\endcsname{%
- \bgroup\noexpand\macroargctxt
- \expandafter\noexpand\csname\the\macname xx\endcsname}%
- \expandafter\xdef\csname\the\macname xx\endcsname##1{%
- \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
- \expandafter\expandafter
- \expandafter\xdef
- \expandafter\expandafter
- \csname\the\macname xxx\endcsname
- \paramlist{%
- \egroup
- \noexpand\norecurse{\the\macname}%
- \noexpand\scanmacro{\temp}\egroup}%
- \else % 10 or more:
- \expandafter\xdef\csname\the\macname\endcsname{%
- \noexpand\getargvals@{\the\macname}{\argl}%
- }%
- \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp
- \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\norecurse
- \fi
+ \else % many
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \bgroup\noexpand\macroargctxt
+ \expandafter\noexpand\csname\the\macname xx\endcsname}%
+ \expandafter\xdef\csname\the\macname xx\endcsname##1{%
+ \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
+ \expandafter\expandafter
+ \expandafter\xdef
+ \expandafter\expandafter
+ \csname\the\macname xxx\endcsname
+ \paramlist{%
+ \egroup
+ \noexpand\norecurse{\the\macname}%
+ \noexpand\scanmacro{\temp}\egroup}%
\fi
\fi}
-\catcode `\@\texiatcatcode\relax
-
\def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}}
% \braceorline decides whether the next nonwhitespace character is a
% {. If so it reads up to the closing }, if not, it reads the whole
% line. Whatever was read is then fed to the next control sequence
-% as an argument (by \parsebrace or \parsearg).
-%
+% as an argument (by \parsebrace or \parsearg)
\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx}
\def\braceorlinexxx{%
\ifx\nchar\bgroup\else
% @alias.
% We need some trickery to remove the optional spaces around the equal
-% sign. Make them active and then expand them all to nothing.
-%
+% sign. Just make them active and then expand them all to nothing.
\def\alias{\parseargusing\obeyspaces\aliasxxx}
\def\aliasxxx #1{\aliasyyy#1\relax}
\def\aliasyyy #1=#2\relax{%
% @inforef is relatively simple.
\def\inforef #1{\inforefzzz #1,,,,**}
-\def\inforefzzz #1,#2,#3,#4**{%
- \putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
+\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
node \samp{\ignorespaces#1{}}}
% @node's only job in TeX is to define \lastnode, which is used in
\toks0 = \expandafter{\lastsection}%
\immediate \writexrdef{title}{\the\toks0 }%
\immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc.
- \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout
+ \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, during \shipout
}%
\fi
}
-% @xrefautosectiontitle on|off says whether @section(ing) names are used
-% automatically in xrefs, if the third arg is not explicitly specified.
-% This was provided as a "secret" @set xref-automatic-section-title
-% variable, now it's official.
-%
-\parseargdef\xrefautomaticsectiontitle{%
- \def\temp{#1}%
- \ifx\temp\onword
- \expandafter\let\csname SETxref-automatic-section-title\endcsname
- = \empty
- \else\ifx\temp\offword
- \expandafter\let\csname SETxref-automatic-section-title\endcsname
- = \relax
- \else
- \errhelp = \EMsimple
- \errmessage{Unknown @xrefautomaticsectiontitle value `\temp',
- must be on|off}%
- \fi\fi
-}
-
-
% @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is
% the node name, #2 the name of the Info cross-reference, #3 the printed
% node name, #4 the name of the Info file, #5 the name of the printed
\setbox0=\hbox{\printedrefname\unskip}%
\ifdim \wd0 = 0pt
% No printed node name was explicitly given.
- \expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax
+ \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax
% Use the node name inside the square brackets.
\def\printedrefname{\ignorespaces #1}%
\else
% etc. don't get their TeX definitions.
\getfilename{#4}%
%
- \edef\pdfxrefdest{#1}%
- \txiescapepdf\pdfxrefdest
+ % See comments at \activebackslashdouble.
+ {\activebackslashdouble \xdef\pdfxrefdest{#1}%
+ \backslashparens\pdfxrefdest}%
%
\leavevmode
\startlink attr{/Border [0 0 0]}%
\angleleft un\-de\-fined\angleright
\iflinks
\ifhavexrefs
- {\toks0 = {#1}% avoid expansion of possibly-complex value
- \message{\linenumber Undefined cross reference `\the\toks0'.}}%
+ \message{\linenumber Undefined cross reference `#1'.}%
\else
\ifwarnedxrefs\else
\global\warnedxrefstrue
% space to prevent strange expansion errors.)
\def\supereject{\par\penalty -20000\footnoteno =0 }
-% @footnotestyle is meaningful for Info output only.
+% @footnotestyle is meaningful for info output only.
\let\footnotestyle=\comment
{\catcode `\@=11
% expands into a box, it must come within the paragraph, lest it
% provide a place where TeX can split the footnote.
\footstrut
- %
- % Invoke rest of plain TeX footnote routine.
\futurelet\next\fo@t
}
}%end \catcode `\@=11
it from ftp://tug.org/tex/epsf.tex.}
%
\def\image#1{%
- \ifx\epsfbox\thisiundefined
+ \ifx\epsfbox\undefined
\ifwarnednoepsf \else
\errhelp = \noepsfhelp
\errmessage{epsf.tex not found, images will be ignored}%
% #2 is (optional) width, #3 is (optional) height.
% #4 is (ignored optional) html alt text.
% #5 is (ignored optional) extension.
-% #6 is just the usual extra ignored arg for parsing stuff.
+% #6 is just the usual extra ignored arg for parsing this stuff.
\newif\ifimagevmode
\def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup
\catcode`\^^M = 5 % in case we're inside an example
%
% Latin1 (ISO-8859-1) character definitions.
\def\latonechardefs{%
- \gdef^^a0{\tie}
+ \gdef^^a0{~}
\gdef^^a1{\exclamdown}
\gdef^^a2{\missingcharmsg{CENT SIGN}}
\gdef^^a3{{\pounds}}
\gdef^^b9{$^1$}
\gdef^^ba{\ordm}
%
- \gdef^^bb{\guillemetright}
+ \gdef^^bb{\guilletright}
\gdef^^bc{$1\over4$}
\gdef^^bd{$1\over2$}
\gdef^^be{$3\over4$}
% Latin2 (ISO-8859-2) character definitions.
\def\lattwochardefs{%
- \gdef^^a0{\tie}
+ \gdef^^a0{~}
\gdef^^a1{\ogonek{A}}
\gdef^^a2{\u{}}
\gdef^^a3{\L}
\gdef^^ea{\ogonek{e}}
\gdef^^eb{\"e}
\gdef^^ec{\v e}
- \gdef^^ed{\'{\dotless{i}}}
- \gdef^^ee{\^{\dotless{i}}}
+ \gdef^^ed{\'\i}
+ \gdef^^ee{\^\i}
\gdef^^ef{\v d}
%
\gdef^^f0{\dh}
\gdef\DeclareUnicodeCharacter#1#2{%
\countUTFz = "#1\relax
- %\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}%
+ \wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}%
\begingroup
\parseXMLCharref
\def\UTFviiiTwoOctets##1##2{%
% Prevent underfull vbox error messages.
\vbadness = 10000
-% Don't be very finicky about underfull hboxes, either.
-\hbadness = 6666
+% Don't be so finicky about underfull hboxes, either.
+\hbadness = 2000
% Following George Bush, get rid of widows and orphans.
\widowpenalty=10000
\message{and turning on texinfo input format.}
-\def^^L{\par} % remove \outer, so ^L can appear in an @comment
-
% DEL is a comment character, in case @c does not suffice.
\catcode`\^^? = 14
% Define macros to output various characters with catcode for normal text.
-\catcode`\"=\other \def\normaldoublequote{"}
-\catcode`\$=\other \def\normaldollar{$}%$ font-lock fix
-\catcode`\+=\other \def\normalplus{+}
-\catcode`\<=\other \def\normalless{<}
-\catcode`\>=\other \def\normalgreater{>}
-\catcode`\^=\other \def\normalcaret{^}
-\catcode`\_=\other \def\normalunderscore{_}
-\catcode`\|=\other \def\normalverticalbar{|}
-\catcode`\~=\other \def\normaltilde{~}
+\catcode`\"=\other
+\catcode`\~=\other
+\catcode`\^=\other
+\catcode`\_=\other
+\catcode`\|=\other
+\catcode`\<=\other
+\catcode`\>=\other
+\catcode`\+=\other
+\catcode`\$=\other
+\def\normaldoublequote{"}
+\def\normaltilde{~}
+\def\normalcaret{^}
+\def\normalunderscore{_}
+\def\normalverticalbar{|}
+\def\normalless{<}
+\def\normalgreater{>}
+\def\normalplus{+}
+\def\normaldollar{$}%$ font-lock fix
% This macro is used to make a character print one way in \tt
% (where it can probably be output as-is), and another way in other fonts,
% In texinfo, backslash is an active character; it prints the backslash
% in fixed width font.
-\catcode`\\=\active % @ for escape char from now on.
-
-% The story here is that in math mode, the \char of \backslashcurfont
-% ends up printing the roman \ from the math symbol font (because \char
-% in math mode uses the \mathcode, and plain.tex sets
-% \mathcode`\\="026E). It seems better for @backslashchar{} to always
-% print a typewriter backslash, hence we use an explicit \mathchar,
-% which is the decimal equivalent of "715c (class 7, e.g., use \fam;
-% ignored family value; char position "5C). We can't use " for the
-% usual hex value because it has already been made active.
-@def@normalbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}}
-@let@backslashchar = @normalbackslash % @backslashchar{} is for user documents.
-
+\catcode`\\=\active
+@def@normalbackslash{{@tt@backslashcurfont}}
% On startup, @fixbackslash assigns:
% @let \ = @normalbackslash
+
% \rawbackslash defines an active \ to do \backslashcurfont.
% \otherbackslash defines an active \ to be a literal `\' character with
-% catcode other. We switch back and forth between these.
+% catcode other.
@gdef@rawbackslash{@let\=@backslashcurfont}
@gdef@otherbackslash{@let\=@realbackslash}
% the literal character `\'.
%
@def@normalturnoffactive{%
- @let"=@normaldoublequote
- @let$=@normaldollar %$ font-lock fix
- @let+=@normalplus
- @let<=@normalless
- @let>=@normalgreater
@let\=@normalbackslash
+ @let"=@normaldoublequote
+ @let~=@normaltilde
@let^=@normalcaret
@let_=@normalunderscore
@let|=@normalverticalbar
- @let~=@normaltilde
+ @let<=@normalless
+ @let>=@normalgreater
+ @let+=@normalplus
+ @let$=@normaldollar %$ font-lock fix
@markupsetuplqdefault
@markupsetuprqdefault
@unsepspaces
% Say @foo, not \foo, in error messages.
@escapechar = `@@
-% These (along with & and #) are made active for url-breaking, so need
-% active definitions as the normal characters.
-@def@normaldot{.}
-@def@normalquest{?}
-@def@normalslash{/}
-
% These look ok in all fonts, so just make them not special.
-% @hashchar{} gets its own user-level command, because of #line.
-@catcode`@& = @other @def@normalamp{&}
-@catcode`@# = @other @def@normalhash{#}
-@catcode`@% = @other @def@normalpercent{%}
-
-@let @hashchar = @normalhash
+@catcode`@& = @other
+@catcode`@# = @other
+@catcode`@% = @other
@c Finally, make ` and ' active, so that txicodequoteundirected and
@c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.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/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.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) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
+MOC4 = @MOC4@
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
MOZILLA_LIBS = @MOZILLA_LIBS@
NM = @NM@
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.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/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.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) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
+MOC4 = @MOC4@
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
MOZILLA_LIBS = @MOZILLA_LIBS@
NM = @NM@
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.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/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.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) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
+MOC4 = @MOC4@
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
MOZILLA_LIBS = @MOZILLA_LIBS@
NM = @NM@
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.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/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.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) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
+MOC4 = @MOC4@
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
MOZILLA_LIBS = @MOZILLA_LIBS@
NM = @NM@
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.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/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.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) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
+MOC4 = @MOC4@
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
MOZILLA_LIBS = @MOZILLA_LIBS@
NM = @NM@
// EntityResolver2.java - Extended SAX entity resolver.
// http://www.saxproject.org
// 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;
// Locator2Impl.java - extended LocatorImpl
// http://www.saxproject.org
// 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;
// http://www.saxproject.org
// Written by David Megginson
// 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;
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.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/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.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) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
+MOC4 = @MOC4@
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
MOZILLA_LIBS = @MOZILLA_LIBS@
NM = @NM@
return valid;
}
+ public void close() throws Exception
+ {
+ release();
+ }
+
/**
* Releases the lock if it is still valid. Marks this lock as invalid.
*/
/* 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.
import java.text.AttributedCharacterIterator;
import java.util.ArrayList;
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.
public class AttributedFormatBuffer implements FormatBuffer
{
private final CPStringBuilder buffer;
- private final ArrayList ranges;
- private final ArrayList attributes;
- private int[] a_ranges;
- private HashMap[] a_attributes;
+ private final ArrayList<Integer> ranges;
+ private final ArrayList<Map<Attribute,Object>> attributes;
+ private int[] aRanges;
+ private List<Map<Attribute,Object>> aAttributes;
private int startingRange;
- AttributedCharacterIterator.Attribute defaultAttr;
+ Attribute defaultAttr;
/**
* This constructor accepts a StringBuffer. If the buffer contains
public AttributedFormatBuffer(CPStringBuilder buffer)
{
this.buffer = new CPStringBuilder(buffer);
- this.ranges = new ArrayList();
- this.attributes = new ArrayList();
+ this.ranges = new ArrayList<Integer>();
+ this.attributes = new ArrayList<Map<Attribute,Object>>();
this.defaultAttr = null;
if (buffer.length() != 0)
{
* and attributes it adds exactly one attribute for the range of characters
* 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.
*/
- 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)
{
- map = new HashMap();
+ map = new HashMap<Attribute,Object>();
map.put(attr, attr);
attributes.add(map);
}
else
attributes.add(null);
- ranges.add(new Integer(new_range));
+ ranges.add(Integer.valueOf(newRange));
}
public void append(String s)
buffer.append(s);
}
- public void append(String s, AttributedCharacterIterator.Attribute attr)
+ public void append(String s, Attribute attr)
{
setDefaultAttribute(attr);
startingRange = buffer.length();
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();
{
for (int i = 0; i < ranges.length; i++)
{
- this.ranges.add(new Integer(ranges[i] + curPos));
- this.attributes.add(attrs[i]);
+ this.ranges.add(Integer.valueOf(ranges[i] + curPos));
+ this.attributes.add(attrs.get(i));
}
}
startingRange = buffer.length();
buffer.append(c);
}
- public void append(char c, AttributedCharacterIterator.Attribute attr)
+ public void append(char c, Attribute attr)
{
setDefaultAttribute(attr);
buffer.append(c);
setDefaultAttribute(null);
}
- public void setDefaultAttribute(AttributedCharacterIterator.Attribute attr)
+ public void setDefaultAttribute(Attribute attr)
{
if (attr == defaultAttr)
return;
startingRange = currentPos;
}
- public AttributedCharacterIterator.Attribute getDefaultAttribute()
+ public Attribute getDefaultAttribute()
{
return defaultAttr;
}
addAttribute(buffer.length(), defaultAttr);
- a_ranges = new int[ranges.size()];
- for (int i = 0; i < a_ranges.length; i++)
- a_ranges[i] = ((Integer)(ranges.get (i))).intValue();
+ aRanges = new int[ranges.size()];
+ for (int i = 0; i < aRanges.length; i++)
+ aRanges[i] = ranges.get (i).intValue();
- a_attributes = new HashMap[attributes.size()];
- System.arraycopy(attributes.toArray(), 0, a_attributes, 0, a_attributes.length);
+ aAttributes = new ArrayList<Map<Attribute,Object>>(attributes);
}
/**
*/
public int[] getRanges()
{
- return a_ranges;
+ return aRanges;
}
/**
* This method returns the array containing the map on the
* 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;
}
}
/* 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.
package gnu.java.text;
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
* @param s The string to append to 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
* to the string.
* @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
* @param c The character to append to 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
*
* @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.
*
* @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
/* FormatCharacter.java -- Implementation of AttributedCharacterIterator for
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.
package gnu.java.text;
import java.text.AttributedCharacterIterator;
+import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.List;
import java.util.Map;
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
private int charIndex;
private int attributeIndex;
private int[] ranges;
- private HashMap[] attributes;
+ private List<Map<Attribute,Object>> attributes;
private static final boolean DEBUG = false;
/**
{
formattedString = "";
ranges = new int[0];
- attributes = new HashMap[0];
+ attributes = new ArrayList<Map<Attribute,Object>>(0);
}
/**
* <pre>
* s = "hello";
* ranges = new int[] { 2, 6 };
- * attributes = new HashMap[2];
+ * attributes = new ArrayList<Map<Attribute,Object>>(2);
* </pre>
- * <code>"he"</code> will have the attributes <code>attributes[0]</code>,
- * <code>"llo"</code> the <code>attributes[1]</code>.
+ * <code>"he"</code> will have the attributes <code>attributes.get(0)</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;
this.ranges = ranges;
* and thus are already documented.
*/
- public Set getAllAttributeKeys()
+ public Set<Attribute> getAllAttributeKeys()
{
- if (attributes != null && attributes[attributeIndex] != null)
- return attributes[attributeIndex].keySet();
+ if (attributes != null && attributes.get(attributeIndex) != null)
+ return attributes.get(attributeIndex).keySet();
else
- return new HashSet();
+ return new HashSet<Attribute>();
}
- public Map getAttributes()
+ public Map<Attribute,Object> getAttributes()
{
- if (attributes != null && attributes[attributeIndex] != null)
- return attributes[attributeIndex];
+ if (attributes != null && attributes.get(attributeIndex) != null)
+ return attributes.get(attributeIndex);
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)
- return attributes[attributeIndex].get (attrib);
+ if (attributes != null && attributes.get(attributeIndex) != null)
+ return attributes.get(attributeIndex).get (attrib);
else
return null;
}
- public int getRunLimit(Set reqAttrs)
+ public int getRunLimit(Set<? extends Attribute> reqAttrs)
{
if (attributes == null)
return formattedString.length();
int currentAttrIndex = attributeIndex;
- Set newKeys;
+ Set<Attribute> newKeys;
do
{
currentAttrIndex++;
- if (currentAttrIndex == attributes.length)
+ if (currentAttrIndex == attributes.size())
return formattedString.length();
- if (attributes[currentAttrIndex] == null)
+ Map<Attribute,Object> currentAttr =
+ attributes.get(currentAttrIndex);
+ if (currentAttr == null)
break;
- newKeys = attributes[currentAttrIndex].keySet();
+ newKeys = currentAttr.keySet();
}
while (newKeys.containsAll (reqAttrs));
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);
return getRunLimit (s);
{
if (attributes == null)
return formattedString.length();
- if (attributes[attributeIndex] == null)
+ if (attributes.get(attributeIndex) == null)
{
- for (int i=attributeIndex+1;i<attributes.length;i++)
- if (attributes[i] != null)
+ for (int i=attributeIndex+1;i<attributes.size();i++)
+ if (attributes.get(i) != null)
return ranges[i-1];
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)
return formattedString.length();
int currentAttrIndex = attributeIndex;
- Set newKeys = null;
+ Set<Attribute> newKeys = null;
do
{
return 0;
currentAttrIndex--;
- if (attributes[currentAttrIndex] == null)
+ Map<Attribute,Object> currentAttr =
+ attributes.get(currentAttrIndex);
+ if (currentAttr == null)
break;
- newKeys = attributes[currentAttrIndex].keySet();
+ newKeys = currentAttr.keySet();
}
while (newKeys.containsAll (reqAttrs));
if (attributes == null)
return 0;
- if (attributes[attributeIndex] == null)
+ Map<Attribute,Object> attrib = attributes.get(attributeIndex);
+ if (attrib == null)
{
for (int i=attributeIndex;i>0;i--)
- if (attributes[i] != null)
+ if (attributes.get(i) != null)
return ranges[attributeIndex-1];
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);
return getRunStart (s);
{
charIndex = formattedString.length()-1;
if (attributes != null)
- attributeIndex = attributes.length-1;
+ attributeIndex = attributes.size()-1;
return formattedString.charAt (charIndex);
}
charIndex = position;
if (attributes != null)
{
- for (attributeIndex=0;attributeIndex<attributes.length;
+ for (attributeIndex=0;attributeIndex<attributes.size();
attributeIndex++)
if (ranges[attributeIndex] > charIndex)
break;
*
* @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();
- Vector new_attributes = new Vector();
+ List<Integer> newRanges = new ArrayList<Integer>();
+ List<Map<Attribute,Object>> newAttributes =
+ new ArrayList<Map<Attribute,Object>>();
int i = 0, j = 0;
- debug("merging " + attributes.length + " attrs");
+ debug("merging " + attributes.size() + " attrs");
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]);
- if (attributes[j] != null)
- this.attributes[i].putAll (attributes[j]);
+ newAttributes.add (this.attributes.get(i));
+ if (attributes.get(j) != null)
+ this.attributes.get(i).putAll (attributes.get(j));
}
else
{
- new_attributes.add (attributes[j]);
+ newAttributes.add (attributes.get(j));
}
if (this.ranges[i] == ranges[j])
{
- new_ranges.add (new Integer (ranges[j]));
+ newRanges.add (Integer.valueOf (ranges[j]));
i++;
j++;
}
else if (this.ranges[i] < ranges[j])
{
- new_ranges.add (new Integer (this.ranges[i]));
+ newRanges.add (Integer.valueOf (this.ranges[i]));
i++;
}
else
{
- new_ranges.add (new Integer (ranges[j]));
+ newRanges.add (Integer.valueOf (ranges[j]));
j++;
}
}
{
for (;i<this.ranges.length;i++)
{
- new_attributes.add (this.attributes[i]);
- new_ranges.add (new Integer (this.ranges[i]));
+ newAttributes.add (this.attributes.get(i));
+ newRanges.add (Integer.valueOf (this.ranges[i]));
}
}
if (j != ranges.length)
{
for (;j<ranges.length;j++)
{
- new_attributes.add (attributes[j]);
- new_ranges.add (new Integer (ranges[j]));
+ newAttributes.add (attributes.get(j));
+ newRanges.add (Integer.valueOf (ranges[j]));
}
}
- this.attributes = new HashMap[new_attributes.size()];
- this.ranges = new int[new_ranges.size()];
- System.arraycopy (new_attributes.toArray(), 0, this.attributes,
- 0, this.attributes.length);
+ this.attributes = newAttributes;
+ this.ranges = new int[newRanges.size()];
- 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();
public void append (AttributedCharacterIterator iterator)
{
char c = iterator.first();
- Vector more_ranges = new Vector();
- Vector more_attributes = new Vector();
+ List<Integer> moreRanges = new ArrayList<Integer>();
+ List<Map<Attribute,Object>> moreAttributes =
+ new ArrayList<Map<Attribute,Object>>();
do
{
formattedString = formattedString + String.valueOf (c);
// TODO: Reduce the size of the output array.
- more_attributes.add (iterator.getAttributes());
- more_ranges.add (new Integer (formattedString.length()));
+ moreAttributes.add (iterator.getAttributes());
+ moreRanges.add (Integer.valueOf (formattedString.length()));
// END TOOD
c = iterator.next();
}
while (c != DONE);
- HashMap[] new_attributes = new HashMap[attributes.length
- + more_attributes.size()];
- int[] new_ranges = new int[ranges.length + more_ranges.size()];
+ List<Map<Attribute,Object>> newAttributes =
+ new ArrayList<Map<Attribute,Object>>(attributes.size() + moreAttributes.size());
+ int[] newRanges = new int[ranges.length + moreRanges.size()];
- System.arraycopy (attributes, 0, new_attributes, 0, attributes.length);
- System.arraycopy (more_attributes.toArray(), 0, new_attributes,
- attributes.length, more_attributes.size());
+ newAttributes.addAll(attributes);
+ newAttributes.addAll(moreAttributes);
- System.arraycopy (ranges, 0, new_ranges, 0, ranges.length);
- Object[] new_ranges_array = more_ranges.toArray();
- for (int i = 0; i < more_ranges.size();i++)
- new_ranges[i+ranges.length] = ((Integer) new_ranges_array[i]).intValue();
+ System.arraycopy (ranges, 0, newRanges, 0, ranges.length);
+ Integer[] newRangesArray = moreRanges.toArray(new Integer[moreRanges.size()]);
+ for (int i = 0; i < moreRanges.size();i++)
+ newRanges[i+ranges.length] = newRangesArray[i].intValue();
- attributes = new_attributes;
- ranges = new_ranges;
+ attributes = newAttributes;
+ ranges = newRanges;
}
/**
* directly in the calling parameters.
*
* @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
* 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];
- HashMap[] new_attributes = new HashMap[attributes.length+1];
+ int[] newRanges = new int[ranges.length+1];
+ List<Map<Attribute,Object>> newAttributes =
+ new ArrayList<Map<Attribute,Object>>(attributes.size()+1);
formattedString += text;
- System.arraycopy (attributes, 0, new_attributes, 0, attributes.length);
- System.arraycopy (ranges, 0, new_ranges, 0, ranges.length);
- new_ranges[ranges.length] = formattedString.length();
- new_attributes[attributes.length] = local_attributes;
+ newAttributes.addAll(attributes);
+ System.arraycopy (ranges, 0, newRanges, 0, ranges.length);
+ newRanges[ranges.length] = formattedString.length();
+ newAttributes.add(new HashMap<Attribute,Object>(localAttributes));
- ranges = new_ranges;
- attributes = new_attributes;
+ ranges = newRanges;
+ attributes = newAttributes;
}
/**
* 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>.
*
* @param text The string to append to the iterator.
/**
* This method adds a set of attributes to a range of character. The
* 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 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.
- * @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.
*
* @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)
- mergeAttributes(new HashMap[] { attributes }, new int[] { range_end });
+ List<Map<Attribute,Object>> mergeAttribs = new ArrayList<Map<Attribute,Object>>();
+ int[] mergeRanges;
+
+ if (rangeStart == 0)
+ mergeRanges = new int[] { rangeEnd };
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 dumpTable()
{
- int start_range = 0;
+ int startRange = 0;
if (!DEBUG)
return;
System.out.println("Dumping internal table:");
for (int i = 0; i < ranges.length; i++)
{
- System.out.print("\t" + start_range + " => " + ranges[i] + ":");
- if (attributes[i] == null)
+ System.out.print("\t" + startRange + " => " + ranges[i] + ":");
+ if (attributes.get(i) == null)
System.out.println("null");
else
{
- Set keyset = attributes[i].keySet();
+ Set<Attribute> keyset = attributes.get(i).keySet();
if (keyset != null)
{
- Iterator keys = keyset.iterator();
+ Iterator<Attribute> keys = keyset.iterator();
while (keys.hasNext())
System.out.print(" " + keys.next());
/* 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.
package gnu.java.text;
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.
public class StringFormatBuffer implements FormatBuffer
{
private final StringBuffer buffer;
- private AttributedCharacterIterator.Attribute defaultAttr;
+ private Attribute defaultAttr;
public StringFormatBuffer(int prebuffer)
{
buffer.append(s);
}
- public void append(String s, AttributedCharacterIterator.Attribute attr)
+ public void append(String s, Attribute attr)
{
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(c);
}
- public void append(char c, AttributedCharacterIterator.Attribute attr)
+ public void append(char c, Attribute attr)
{
buffer.append(c);
}
- public void setDefaultAttribute(AttributedCharacterIterator.Attribute attr)
+ public void setDefaultAttribute(Attribute attr)
{
defaultAttr = attr;
}
- public AttributedCharacterIterator.Attribute getDefaultAttribute()
+ public Attribute getDefaultAttribute()
{
return defaultAttr;
}
/* 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.
*/
private static class DSSIInfo extends Info
{
+ String copyright;
String soname;
long index;
- public DSSIInfo(String name, String vendor, String description,
- String version, String soname, long index)
+ public DSSIInfo(String name, String vendor, String label,
+ 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.index = index;
}
static native String getDSSIVendor_(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 handle;
String copyright = getDSSICopyright_(handle);
String label = getDSSIName_(handle);
String vendor = getDSSIVendor_(handle);
- list.add(new DSSIInfo(name, vendor, label,
+ list.add(new DSSIInfo(name, vendor, label, copyright,
"DSSI-1", soname, index));
index++;
} while (true);
return n.endsWith(".so");
}
});
- List ilist = new ArrayList();
+ List<DSSIInfo> ilist = new ArrayList<DSSIInfo>();
for (int i = 0; i < sofiles.length; i++)
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()
/* 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.
{
private String name;
private String description;
- private List instruments = new ArrayList();
- private List resources = new ArrayList();
+ private List<Instrument> instruments = new ArrayList<Instrument>();
+ private List<SoundbankResource> resources = new ArrayList<SoundbankResource>();
private String vendor;
private String version;
*/
public SoundbankResource[] getResources()
{
- return (SoundbankResource[])
- resources.toArray(new SoundbankResource[resources.size()]);
+ return resources.toArray(new SoundbankResource[resources.size()]);
}
/* @see javax.sound.midi.Soundbank#getInstruments()
*/
public Instrument[] getInstruments()
{
- return (Instrument[])
- instruments.toArray(new Instrument[instruments.size()]);
+ return instruments.toArray(new Instrument[instruments.size()]);
}
/* @see javax.sound.midi.Soundbank#getInstrument(javax.sound.midi.Patch)
*/
public Instrument getInstrument(Patch patch)
{
- Iterator itr = instruments.iterator();
+ Iterator<Instrument> itr = instruments.iterator();
while (itr.hasNext())
{
- Instrument i = (Instrument) itr.next();
+ Instrument i = itr.next();
if (i.getPatch().equals(patch))
return i;
}
MidiChannel channels[] = new MidiChannel[16];
// The list of known soundbanks, and the default one.
- List soundbanks = new ArrayList();
+ List<Soundbank> soundbanks = new ArrayList<Soundbank>();
DSSISoundbank defaultSoundbank;
/**
*/
public Instrument[] getAvailableInstruments()
{
- List instruments = new ArrayList();
- Iterator itr = soundbanks.iterator();
+ List<Instrument> instruments = new ArrayList<Instrument>();
+ Iterator<Soundbank> itr = soundbanks.iterator();
while (itr.hasNext())
{
- Soundbank sb = (Soundbank) itr.next();
+ Soundbank sb = itr.next();
Instrument ins[] = sb.getInstruments();
for (int i = 0; i < ins.length; i++)
instruments.add(ins[i]);
}
- return (Instrument[])
- instruments.toArray(new Instrument[instruments.size()]);
+ return instruments.toArray(new Instrument[instruments.size()]);
}
/* (non-Javadoc)
/* 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.
int Mtrk = din.readInt();
if (Mtrk != 0x4d54726b)
throw new InvalidMidiDataException("Invalid MIDI track header.");
- int length = din.readInt();
+ din.readInt(); // length
int runningStatus = -1;
int click = 0;
/* 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.
*/
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;
while (i < eventCount)
{
/* 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.
boolean foundFmt = 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 chunkLength = 0;
numberChannels = readUnsignedShortLE(din);
sampleRate = readUnsignedIntLE(din);
bytesPerSecond = readUnsignedIntLE(din);
- blockAlign = readUnsignedShortLE(din);
+ readUnsignedShortLE(din); // blockAlign
bitsPerSample = readUnsignedShortLE(din);
din.skip(chunkLength - 16);
break;
/* 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.
// and see if there is one matching the given line
// if the format comes from the gstreamer backend
// gstreamer will be able to deal with it
- Class clazz = info.getLineClass();
+ Class<?> clazz = info.getLineClass();
DataLine.Info _info = (DataLine.Info) info;
if (clazz == SourceDataLine.class)
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)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.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/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.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) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
+MOC4 = @MOC4@
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
MOZILLA_LIBS = @MOZILLA_LIBS@
NM = @NM@
#!/bin/sh
# 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
# later released in X11R6 (xc/config/util/install.sh) with the
-s) stripcmd=$stripprog;;
-t) dst_arg=$2
- # Protect names problematic for `test' and other utilities.
- case $dst_arg in
- -* | [=\(\)!]) dst_arg=./$dst_arg;;
- esac
shift;;
-T) no_target_directory=true;;
fi
shift # arg
dst_arg=$arg
- # Protect names problematic for `test' and other utilities.
- case $dst_arg in
- -* | [=\(\)!]) dst_arg=./$dst_arg;;
- esac
done
fi
fi
if test -z "$dir_arg"; then
- do_exit='(exit $ret); exit $ret'
- trap "ret=129; $do_exit" 1
- trap "ret=130; $do_exit" 2
- trap "ret=141; $do_exit" 13
- trap "ret=143; $do_exit" 15
+ trap '(exit $?); exit' 1 2 13 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
for src
do
- # Protect names problematic for `test' and other utilities.
+ # Protect names starting with `-'.
case $src in
- -* | [=\(\)!]) src=./$src;;
+ -*) src=./$src;;
esac
if test -n "$dir_arg"; then
echo "$0: no destination specified." >&2
exit 1
fi
+
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 double slashes aren't ignored.
case $dstdir in
/*) prefix='/';;
- [-=\(\)!]*) prefix='./';;
+ -*) prefix='./';;
*) prefix='';;
esac
for d
do
- test X"$d" = X && continue
+ test -z "$d" && continue
prefix=$prefix$d
if test -d "$prefix"; then
* Segment vectors containing solid areas and holes
* This is package-private to avoid an accessor method.
*/
- Vector solids;
+ Vector<Segment> solids;
/**
* Segment vectors containing solid areas and holes
* This is package-private to avoid an accessor method.
*/
- Vector holes;
+ Vector<Segment> holes;
/**
* Vector (temporary) storing curve-curve intersections
*/
- private Vector cc_intersections;
+ private Vector<double[]> ccIntersections;
/**
* Winding rule WIND_NON_ZERO used, after construction,
*/
public Area()
{
- solids = new Vector();
- holes = new Vector();
+ solids = new Vector<Segment>();
+ holes = new Vector<Segment>();
}
/**
{
this();
- Vector p = makeSegment(s);
+ Vector<Segment> p = makeSegment(s);
// empty path
if (p == null)
// delete empty paths
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--);
/*
* 4: Repeat (3) until no segments remain in the list
* 5: Remove redundant paths and sort into solids and holes
*/
- Vector paths = new Vector();
Segment v;
for (int i = 0; i < p.size(); i++)
{
- Segment path = (Segment) p.elementAt(i);
+ Segment path = p.elementAt(i);
createNodesSelf(path);
}
for (int i = 0; i < p.size() - 1; i++)
for (int j = i + 1; j < p.size(); j++)
{
- Segment path1 = (Segment) p.elementAt(i);
- Segment path2 = (Segment) p.elementAt(j);
+ Segment path1 = p.elementAt(i);
+ Segment path2 = p.elementAt(j);
createNodes(path1, path2);
}
}
// we have intersecting points.
- Vector segments = new Vector();
+ Vector<Segment> segments = new Vector<Segment>();
for (int i = 0; i < p.size(); i++)
{
- Segment path = v = (Segment) p.elementAt(i);
+ Segment path = v = p.elementAt(i);
do
{
segments.add(v);
while (v != path);
}
- paths = weilerAtherton(segments);
+ Vector<Segment> paths = weilerAtherton(segments);
deleteRedundantPaths(paths);
}
Area B = (Area) area.clone();
- Vector pathA = new Vector();
- Vector pathB = new Vector();
+ Vector<Segment> pathA = new Vector<Segment>();
+ Vector<Segment> pathB = new Vector<Segment>();
pathA.addAll(solids);
pathA.addAll(holes);
pathB.addAll(B.solids);
pathB.addAll(B.holes);
- int nNodes = 0;
-
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++)
{
- Segment b = (Segment) pathB.elementAt(j);
- nNodes += createNodes(a, b);
+ Segment b = pathB.elementAt(j);
+ createNodes(a, b);
}
}
- Vector paths = new Vector();
+ Vector<Segment> paths = new Vector<Segment>();
Segment v;
// we have intersecting points.
- Vector segments = new Vector();
+ Vector<Segment> segments = new Vector<Segment>();
// In a union operation, we keep all
// segments of A oustide B and all B outside A
for (int i = 0; i < pathA.size(); i++)
{
- v = (Segment) pathA.elementAt(i);
+ v = pathA.elementAt(i);
Segment path = v;
do
{
for (int i = 0; i < pathB.size(); i++)
{
- v = (Segment) pathB.elementAt(i);
+ v = pathB.elementAt(i);
Segment path = v;
do
{
return;
}
- Vector pathA = new Vector();
+ Vector<Segment> pathA = new Vector<Segment>();
Area B = (Area) area.clone();
pathA.addAll(solids);
pathA.addAll(holes);
setDirection(B.holes, true);
setDirection(B.solids, false);
- Vector pathB = new Vector();
+ Vector<Segment> pathB = new Vector<Segment>();
pathB.addAll(B.solids);
pathB.addAll(B.holes);
- int nNodes = 0;
-
// create nodes
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++)
{
- Segment b = (Segment) pathB.elementAt(j);
- nNodes += createNodes(a, b);
+ Segment b = pathB.elementAt(j);
+ createNodes(a, b);
}
}
- Vector paths = new Vector();
-
// we have intersecting points.
- Vector segments = new Vector();
+ Vector<Segment> segments = new Vector<Segment>();
// In a subtraction operation, we keep all
// segments of A oustide B and all B within A
// and the segments before and after any node
for (int i = 0; i < pathA.size(); i++)
{
- Segment v = (Segment) pathA.elementAt(i);
+ Segment v = pathA.elementAt(i);
Segment path = v;
if (v.isSegmentOutside(area) && v.node == null)
segments.add(v);
while (v != path);
}
- paths = weilerAtherton(segments);
+ Vector<Segment> paths = weilerAtherton(segments);
deleteRedundantPaths(paths);
}
if (equals(area))
return;
- Vector pathA = new Vector();
+ Vector<Segment> pathA = new Vector<Segment>();
Area B = (Area) area.clone();
pathA.addAll(solids);
pathA.addAll(holes);
- Vector pathB = new Vector();
+ Vector<Segment> pathB = new Vector<Segment>();
pathB.addAll(B.solids);
pathB.addAll(B.holes);
- int nNodes = 0;
-
// create nodes
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++)
{
- Segment b = (Segment) pathB.elementAt(j);
- nNodes += createNodes(a, b);
+ Segment b = pathB.elementAt(j);
+ createNodes(a, b);
}
}
- Vector paths = new Vector();
-
// we have intersecting points.
- Vector segments = new Vector();
+ Vector<Segment> segments = new Vector<Segment>();
// In an intersection operation, we keep all
// segments of A within B and all B within A
// and the segments before and after any node
for (int i = 0; i < pathA.size(); i++)
{
- Segment v = (Segment) pathA.elementAt(i);
+ Segment v = pathA.elementAt(i);
Segment path = v;
if (! v.isSegmentOutside(area) && v.node == null)
segments.add(v);
for (int i = 0; i < pathB.size(); i++)
{
- Segment v = (Segment) pathB.elementAt(i);
+ Segment v = pathB.elementAt(i);
Segment path = v;
if (! v.isSegmentOutside(this) && v.node == null)
segments.add(v);
while (v != path);
}
- paths = weilerAtherton(segments);
+ Vector<Segment> paths = weilerAtherton(segments);
deleteRedundantPaths(paths);
}
return;
}
- Vector pathA = new Vector();
+ Vector<Segment> pathA = new Vector<Segment>();
Area B = (Area) area.clone();
- Vector pathB = new Vector();
+ Vector<Segment> pathB = new Vector<Segment>();
pathA.addAll(solids);
pathA.addAll(holes);
pathB.addAll(B.solids);
pathB.addAll(B.holes);
- int nNodes = 0;
-
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++)
{
- Segment b = (Segment) pathB.elementAt(j);
- nNodes += createNodes(a, b);
+ Segment b = pathB.elementAt(j);
+ createNodes(a, b);
}
}
- Vector paths = new Vector();
Segment v;
// we have intersecting points.
- Vector segments = new Vector();
+ Vector<Segment> segments = new Vector<Segment>();
// In an XOR operation, we operate on all segments
for (int i = 0; i < pathA.size(); i++)
{
- v = (Segment) pathA.elementAt(i);
+ v = pathA.elementAt(i);
Segment path = v;
do
{
for (int i = 0; i < pathB.size(); i++)
{
- v = (Segment) pathB.elementAt(i);
+ v = pathB.elementAt(i);
Segment path = v;
do
{
while (v != path);
}
- paths = weilerAtherton(segments);
+ Vector<Segment> paths = weilerAtherton(segments);
deleteRedundantPaths(paths);
}
*/
public void reset()
{
- solids = new Vector();
- holes = new Vector();
+ solids = new Vector<Segment>();
+ holes = new Vector<Segment>();
}
/**
double totalArea = 0;
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++)
- totalArea -= Math.abs(((Segment) holes.elementAt(i)).getSignedArea());
+ totalArea -= Math.abs(holes.elementAt(i).getSignedArea());
if (totalArea <= EPSILON)
return true;
public boolean isPolygonal()
{
for (int i = 0; i < holes.size(); i++)
- if (! ((Segment) holes.elementAt(i)).isPolygonal())
+ if (!holes.elementAt(i).isPolygonal())
return false;
for (int i = 0; i < solids.size(); i++)
- if (! ((Segment) solids.elementAt(i)).isPolygonal())
+ if (!solids.elementAt(i).isPolygonal())
return false;
return true;
}
if (holes.size() != 0 || solids.size() != 1)
return false;
- Segment path = (Segment) solids.elementAt(0);
+ Segment path = solids.elementAt(0);
if (! path.isPolygonal())
return false;
double xmax;
double ymin;
double ymax;
- xmin = xmax = ((Segment) solids.elementAt(0)).P1.getX();
- ymin = ymax = ((Segment) solids.elementAt(0)).P1.getY();
+ xmin = xmax = solids.elementAt(0).P1.getX();
+ ymin = ymax = solids.elementAt(0).P1.getY();
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);
ymin = Math.min(r.getMinY(), ymin);
xmax = Math.max(r.getMaxX(), xmax);
{
Area clone = new Area();
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++)
- clone.holes.add(((Segment) holes.elementAt(i)).cloneSegmentList());
+ clone.holes.add(holes.elementAt(i).cloneSegmentList());
return clone;
}
catch (CloneNotSupportedException e)
|| holes.size() != area.holes.size())
return false;
- Vector pathA = new Vector();
+ Vector<Segment> pathA = new Vector<Segment>();
pathA.addAll(solids);
pathA.addAll(holes);
- Vector pathB = new Vector();
+ Vector<Segment> pathB = new Vector<Segment>();
pathB.addAll(area.solids);
pathB.addAll(area.holes);
{
for (int j = 0; j < nPaths; j++)
{
- Segment p1 = (Segment) pathA.elementAt(i);
- Segment p2 = (Segment) pathB.elementAt(j);
+ Segment p1 = pathA.elementAt(i);
+ Segment p2 = pathB.elementAt(j);
if (! match[0][i] && ! match[1][j])
if (p1.pathEquals(p2))
match[0][i] = match[1][j] = true;
public void transform(AffineTransform at)
{
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++)
- ((Segment) holes.elementAt(i)).transformSegmentList(at);
+ holes.elementAt(i).transformSegmentList(at);
// Note that the orientation is not invariant under inversion
if ((at.getType() & AffineTransform.TYPE_FLIP) != 0)
{
int n = 0;
for (int i = 0; i < solids.size(); i++)
- if (((Segment) solids.elementAt(i)).contains(x, y))
+ if (solids.elementAt(i).contains(x, y))
n++;
for (int i = 0; i < holes.size(); i++)
- if (((Segment) holes.elementAt(i)).contains(x, y))
+ if (holes.elementAt(i).contains(x, y))
n--;
return (n != 0);
{
Segment v;
Segment start;
- start = v = (Segment) solids.elementAt(path);
+ start = v = solids.elementAt(path);
do
{
if (l[i].hasIntersections(v))
{
Segment v;
Segment start;
- start = v = (Segment) holes.elementAt(path);
+ start = v = holes.elementAt(path);
do
{
if (l[i].hasIntersections(v))
// but encloses a hole?
Rectangle2D r = new Rectangle2D.Double(x, y, w, h);
for (int path = 0; path < holes.size(); path++)
- if (! ((Segment) holes.elementAt(path)).isSegmentOutside(r))
+ if (! holes.elementAt(path).isSegmentOutside(r))
return false;
return true;
{
Segment v;
Segment start;
- start = v = (Segment) solids.elementAt(path);
+ start = v = solids.elementAt(path);
do
{
if (l[i].hasIntersections(v))
{
Segment v;
Segment start;
- start = v = (Segment) holes.elementAt(path);
+ start = v = holes.elementAt(path);
do
{
if (l[i].hasIntersections(v))
return true;
// 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))
return true;
return false;
*/
private class AreaIterator implements PathIterator
{
- private Vector segments;
+ private Vector<IteratorSegment> segments;
private int index;
private AffineTransform at;
{
this.at = at;
index = 0;
- segments = new Vector();
- Vector allpaths = new Vector();
+ segments = new Vector<IteratorSegment>();
+ Vector<Segment> allpaths = new Vector<Segment>();
allpaths.addAll(solids);
allpaths.addAll(holes);
for (int i = 0; i < allpaths.size(); i++)
{
- Segment v = (Segment) allpaths.elementAt(i);
+ Segment v = allpaths.elementAt(i);
Segment start = v;
IteratorSegment is = new IteratorSegment();
public int currentSegment(double[] coords)
{
- IteratorSegment s = (IteratorSegment) segments.elementAt(index);
+ IteratorSegment s = segments.elementAt(index);
if (at != null)
at.transform(s.coords, 0, coords, 0, 3);
else
public int currentSegment(float[] coords)
{
- IteratorSegment s = (IteratorSegment) segments.elementAt(index);
+ IteratorSegment s = segments.elementAt(index);
double[] d = new double[6];
if (at != null)
{
*
* 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)
{
// Iterate over the path
- Segment start = (Segment) segments.elementAt(0);
+ Segment start = segments.elementAt(0);
Segment s = start;
do
{
double[] temp = new double[2];
temp[0] = t1 + s * w1;
temp[1] = t2 + t * w1;
- cc_intersections.add(temp);
+ ccIntersections.add(temp);
return;
}
if (! r1.intersects(r2))
return null;
- cc_intersections = new Vector();
+ ccIntersections = new Vector<double[]>();
recursiveSubdivide(curve1.getCubicCurve2D(), curve2.getCubicCurve2D(),
getRecursionDepth(curve1), getRecursionDepth(curve2),
0.0, 0.0, 1.0, 1.0);
- if (cc_intersections.size() == 0)
+ if (ccIntersections.size() == 0)
return null;
- Intersection[] results = new Intersection[cc_intersections.size()];
- for (int i = 0; i < cc_intersections.size(); i++)
+ Intersection[] results = new Intersection[ccIntersections.size()];
+ 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],
temp[1]);
}
- cc_intersections = null;
+ ccIntersections = null;
return (results);
}
/**
* 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
* parametric form of the Bezier and solving the resulting quadratic.
* This is package-private to avoid an accessor method.
* Helper method
* 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);
double[] coords = new double[6];
Segment subpath = null;
}
while (a != A); // until one wrap.
- return (nNodes);
+ return nNodes;
}
/**
* solid areas) Clears any nodes. Sorts the remaining paths into solids
* 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();
neg = ((windingRule == PathIterator.WIND_NON_ZERO) ? -1 : 1);
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
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.
int windingA = pathA.hasClockwiseOrientation() ? 1 : neg;
for (int j = 0; j < npaths; j++)
if (i != j)
{
- Segment pathB = (Segment) paths.elementAt(j);
+ Segment pathB = paths.elementAt(j);
// A contains B
if (bb[i].intersects(bb[j]))
windingNumbers[i][1] = contains[i][i];
}
- Vector solids = new Vector();
- Vector holes = new Vector();
+ Vector<Segment> solids = new Vector<Segment>();
+ Vector<Segment> holes = new Vector<Segment>();
if (windingRule == PathIterator.WIND_NON_ZERO)
{
* @param clockwise gives the direction,
* true = clockwise, false = counter-clockwise
*/
- private void setDirection(Vector paths, boolean clockwise)
+ private void setDirection(Vector<Segment> paths, boolean clockwise)
{
Segment v;
for (int i = 0; i < paths.size(); i++)
{
- v = (Segment) paths.elementAt(i);
+ v = paths.elementAt(i);
if (clockwise != v.hasClockwiseOrientation())
v.reverseAll();
}
*/
Segment cloneSegmentList() throws CloneNotSupportedException
{
- Vector list = new Vector();
+ Vector<Segment> list = new Vector<Segment>();
Segment v = next;
while (v != this)
v = clone;
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.next = v;
*/
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++)
{
Point2D p = x[i].p;
Intersection[] A = new Intersection[nNodes];
Intersection[] B = new Intersection[nNodes];
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
// Bubble sort, OK I suppose, since the number of intersections
* @status updated to 1.5
*/
public class XMLDecoder
+ implements AutoCloseable
{
private Object owner;
* @author Robert Schuster (robertschuster@fsfe.org)
* @since 1.4
*/
-public class XMLEncoder extends Encoder
+public class XMLEncoder
+ extends Encoder
+ implements AutoCloseable
{
Object owner;
* @since 1.5
*/
public interface Closeable
+ extends AutoCloseable
{
/**
*
* @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
if (dump)
dumpElementln("ENUM=");
ObjectStreamClass osc = (ObjectStreamClass) readObject();
+ int enumHandle = assignNewHandle(null, shared);
String constantName = (String) readObject();
if (dump)
dumpElementln("CONSTANT NAME = " + constantName);
Class clazz = osc.forClass();
Enum instance = Enum.valueOf(clazz, constantName);
- assignNewHandle(instance,shared);
+ rememberHandle(instance, shared, enumHandle);
ret_val = instance;
break;
}
*
* @see DataOutput
*/
-public interface ObjectOutput extends DataOutput
+public interface ObjectOutput
+ extends DataOutput, AutoCloseable
{
/**
* This method writes the specified byte to the output stream.
/* 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.
{
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);
+ }
}
--- /dev/null
+/* 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;
+}
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.
* Otherwise, return false.
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));
+ }
+
}
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.
* In contrast to the <code>Character</code> constructor, this method
/* 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.
* @see Class#forName(String)
* @see ClassLoader#findSystemClass(String)
* @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+.
/* IllegalAccessException.java -- thrown on attempt to reflect on
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.
* @see Field#getDouble(Object)
* @see Method#invoke(Object, 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+.
/* InstantiationException.java -- thrown when reflection cannot create an
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.
* @author Brian Jones
* @author Warren Levy (warrenl@cygnus.com)
* @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+.
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.
* @param x value to examine
/* LinkageError.java -- thrown when classes valid at separate compile times
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.
*
* @author Brian Jones
* @author Tom Tromey (tromey@cygnus.com)
- * @status updated to 1.4
+ * @status updated to 1.7
*/
public class LinkageError extends Error
{
{
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);
+ }
+
}
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.
* @param x value to examine
/* 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.
* @author Brian Jones
* @author Warren Levy (warrenl@cygnus.com)
* @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+.
/* 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.
*
* @author Brian Jones
* @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+.
--- /dev/null
+/* 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);
+ }
+
+}
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.
* @since 1.5
*/
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
// this way.
return Character.codePointAt(this, index);
* <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
* @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)
* @since 1.5
*/
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
// this way.
return Character.codePointBefore(this, index);
*/
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
* starts its life perfectly valid. Although it is marked final, you can
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
* the necessary provisions for the collections used by the
/* 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.
* @see Method#invoke(Object,Object[])
* @see Constructor#newInstance(Object[])
* @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+.
*
* @return the class that declared this member
*/
- Class getDeclaringClass();
+ Class<?> getDeclaringClass();
/**
* Gets the simple name of this member. This will be a valid Java
/* 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.
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
* given int. The keywords are printed in this order:
* @since 1.4
*/
public abstract class FileLock
+ implements AutoCloseable
{
private final FileChannel channel;
private final long position;
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public interface Connection
+ extends AutoCloseable
{
/**
* This transaction isolation level indicates that transactions are not
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public interface ResultSet
+ extends AutoCloseable
{
/**
* The rows will be processed in order from first to last.
* @author Aaron M. Renn (arenn@urbanophile.com)
*/
public interface Statement
+ extends AutoCloseable
{
int CLOSE_CURRENT_RESULT = 1;
int KEEP_CURRENT_RESULT = 2;
/* 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.
import java.util.Map;
import java.util.Set;
+import static java.text.AttributedCharacterIterator.Attribute;
+
/**
* This class models a <code>String</code> with attributes over various
* subranges of the string. It allows applications to access this
{
/** A Map of the attributes */
- Map attribs;
+ Map<? extends Attribute, ?> attribs;
/** The beginning index of the attributes */
int beginIndex;
* @param beginIndex the start 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.beginIndex = beginIndex;
* @param attributes The attribute list.
*/
public AttributedString(String str,
- Map<? extends AttributedCharacterIterator.Attribute, ?> attributes)
+ Map<? extends Attribute, ?> attributes)
{
this(str);
* <code>null</code> to include all attributes.
*/
public AttributedString(AttributedCharacterIterator aci, int begin, int end,
- AttributedCharacterIterator.Attribute[] attributes)
+ Attribute[] attributes)
{
// Validate some arguments
if ((begin < 0) || (end < begin) || end > aci.getEndIndex())
CPStringBuilder sb = new CPStringBuilder("");
// Get the valid attribute list
- Set allAttribs = aci.getAllAttributeKeys();
+ Set<Attribute> allAttribs = aci.getAllAttributeKeys();
if (attributes != null)
allAttribs.retainAll(Arrays.asList(attributes));
// Loop through and extract the attributes
char c = aci.setIndex(begin);
- ArrayList accum = new ArrayList();
+ ArrayList<AttributeRange> accum = new ArrayList<AttributeRange>();
do
{
sb.append(c);
- Iterator iter = allAttribs.iterator();
+ Iterator<Attribute> iter = allAttribs.iterator();
while(iter.hasNext())
{
Object obj = iter.next();
// What should we do if this is not true?
- if (!(obj instanceof AttributedCharacterIterator.Attribute))
+ if (!(obj instanceof Attribute))
continue;
- AttributedCharacterIterator.Attribute attrib =
- (AttributedCharacterIterator.Attribute)obj;
+ Attribute attrib = (Attribute)obj;
// Make sure the attribute is defined.
Object attribObj = aci.getAttribute(attrib);
}
// 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);
// Add it to the attribute list.
while( aci.getIndex() < end );
attribs = new AttributeRange[accum.size()];
- attribs = (AttributeRange[]) accum.toArray(attribs);
+ attribs = accum.toArray(attribs);
sci = new StringCharacterIterator(sb.toString());
}
* @param attrib The attribute to add.
* @param value The value of the attribute.
*/
- public void addAttribute(AttributedCharacterIterator.Attribute attrib,
- Object value)
+ public void addAttribute(Attribute attrib, Object value)
{
addAttribute(attrib, value, 0, sci.getEndIndex());
}
* @exception IllegalArgumentException If attribute is <code>null</code> or
* the subrange is not valid.
*/
- public void addAttribute(AttributedCharacterIterator.Attribute attrib,
- Object value, int begin, int end)
+ public void addAttribute(Attribute attrib, Object value, int begin, int end)
{
if (attrib == null)
throw new IllegalArgumentException("null attribute");
if (end <= begin)
throw new IllegalArgumentException("Requires end > begin");
- HashMap hm = new HashMap();
+ HashMap<Attribute,Object> hm = new HashMap<Attribute,Object>();
hm.put(attrib, value);
addAttributes(hm, begin, end);
* <code>null</code>.
* @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)
{
if (attributes == null)
*
* @return An <code>AttributedCharacterIterator</code> for this string.
*/
- public AttributedCharacterIterator getIterator(
- AttributedCharacterIterator.Attribute[] attributes)
+ public AttributedCharacterIterator getIterator(Attribute[] attributes)
{
return(getIterator(attributes, 0, sci.getEndIndex()));
}
*
* @return An <code>AttributedCharacterIterator</code> for this string.
*/
- public AttributedCharacterIterator getIterator(
- AttributedCharacterIterator.Attribute[] attributes,
+ public AttributedCharacterIterator getIterator(Attribute[] attributes,
int beginIndex, int endIndex)
{
if ((beginIndex < 0) || (endIndex > sci.getEndIndex()) ||
/* 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.
import java.util.Map;
import java.util.Set;
+import static java.text.AttributedCharacterIterator.Attribute;
+
/**
* This class implements the AttributedCharacterIterator interface. It
* is used by AttributedString.getIterator().
* The list of attributes that the user is interested in. We may,
* at our option, not return any other attributes.
*/
- private AttributedCharacterIterator.Attribute[] restricts;
+ private Attribute[] restricts;
/*************************************************************************/
* Returns a list of all the attribute keys that are defined anywhere
* on this string.
*/
- public Set getAllAttributeKeys()
+ public Set<Attribute> getAllAttributeKeys()
{
- HashSet s = new HashSet();
+ HashSet<Attribute> s = new HashSet<Attribute>();
if (attribs == null)
return(s);
|| attribs[i].endIndex <= getBeginIndex())
continue;
- Set key_set = attribs[i].attribs.keySet();
- Iterator iter = key_set.iterator();
+ Iterator<? extends Attribute> iter = attribs[i].attribs.keySet().iterator();
while (iter.hasNext())
{
s.add(iter.next());
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);
return(getRunLimit(s));
}
- public synchronized int getRunLimit(Set attributeSet)
+ public synchronized int getRunLimit(Set<? extends Attribute> attributeSet)
{
if (attributeSet == null)
return ci.getEndIndex();
int limit = current;
if (current == end)
return end;
- Map runValues = getAttributes();
+ Map<Attribute,Object> runValues = getAttributes();
while (limit < end)
{
- Iterator iterator = attributeSet.iterator();
+ Iterator<? extends Attribute> iterator = attributeSet.iterator();
while (iterator.hasNext())
{
- Attribute attributeKey = (Attribute) iterator.next();
+ Attribute attributeKey = iterator.next();
Object v1 = runValues.get(attributeKey);
Object v2 = getAttribute(attributeKey, limit + 1);
boolean changed = false;
*
* return The index of the first character in the run.
*/
- public int getRunStart(AttributedCharacterIterator.Attribute attrib)
+ public int getRunStart(Attribute attrib)
{
if (attrib == null)
return ci.getBeginIndex();
- HashSet s = new HashSet();
+ HashSet<Attribute> s = new HashSet<Attribute>();
s.add(attrib);
return(getRunStart(s));
}
*
* 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)
return ci.getBeginIndex();
int start = current;
if (start == begin)
return begin;
- Map runValues = getAttributes();
+ Map<Attribute, Object> runValues = getAttributes();
int prev = start - 1;
while (start > begin)
{
- Iterator iterator = attributeSet.iterator();
+ Iterator<? extends Attribute> iterator = attributeSet.iterator();
while (iterator.hasNext())
{
- Attribute attributeKey = (Attribute) iterator.next();
+ Attribute attributeKey = iterator.next();
Object v1 = runValues.get(attributeKey);
Object v2 = getAttribute(attributeKey, prev);
boolean changed = false;
{
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))
{
return attribs[i].attribs.get(key);
* Return a list of all the attributes and values defined for this
* character
*/
- public Map getAttributes()
+ public Map<Attribute,Object> getAttributes()
{
- HashMap m = new HashMap();
+ HashMap<Attribute,Object> m = new HashMap<Attribute,Object>();
if (attribs == null)
return(m);
/* 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.
// A list of indices where a formatting code was found. These
// are indicies into the original text -- not into the text after
// the codes have been removed.
- private ArrayList formatterIndices;
+ private ArrayList<Integer> formatterIndices;
// Indices of the starts of runs in the text.
private int[] runs;
if (val instanceof NumericShaper)
shaper = (NumericShaper) val;
- char[] text = new char[iter.getEndIndex() - iter.getBeginIndex()];
- this.embeddings = new byte[this.text.length];
- this.embeddingOffset = 0;
- this.length = text.length;
- for (int i = 0; i < this.text.length; ++i)
+ text = new char[iter.getEndIndex() - iter.getBeginIndex()];
+ embeddings = new byte[text.length];
+ embeddingOffset = 0;
+ length = text.length;
+ for (int i = 0; i < text.length; ++i)
{
- this.text[i] = iter.current();
+ text[i] = iter.current();
val = iter.getAttribute(TextAttribute.BIDI_EMBEDDING);
if (val instanceof Integer)
bval = 0;
else
bval = (byte) ival;
- this.embeddings[i] = bval;
+ embeddings[i] = bval;
}
}
// Invoke the numeric shaper, if specified.
if (shaper != null)
- shaper.shape(this.text, 0, this.length);
+ shaper.shape(text, 0, length);
runBidi();
}
{
// Mark this character for removal.
if (formatterIndices == null)
- formatterIndices = new ArrayList();
+ formatterIndices = new ArrayList<Integer>();
formatterIndices.add(Integer.valueOf(i));
}
else if (directionalOverride != -1)
if (i == size)
nextFmt = length;
else
- nextFmt = ((Integer) formatterIndices.get(i)).intValue();
+ nextFmt = formatterIndices.get(i).intValue();
// Non-formatter codes are from 'input' to 'nextFmt'.
int len = nextFmt - input;
System.arraycopy(levels, input, levels, output, len);
// Process from the end as we are copying the array over itself here.
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+1 is the target of our copying. output is the location
/* 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.
This file is part of GNU Classpath.
}
try
{
- Class k = Class.forName(className);
+ Class<?> k = Class.forName(className);
return (BreakIterator) k.newInstance();
}
catch (ClassNotFoundException x1)
/* 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.
This file is part of GNU Classpath.
// This isn't explicitly documented. But for instance we accept
// '#' as a literal hash in a format string.
int index = 0, max = newPattern.length();
- Vector stringVec = new Vector ();
- Vector limitVec = new Vector ();
+ Vector<String> stringVec = new Vector<String> ();
+ Vector<Double> limitVec = new Vector<Double> ();
final CPStringBuilder buf = new CPStringBuilder ();
while (true)
choiceLimits = new double[limitVec.size()];
for (int i = 0; i < choiceLimits.length; ++i)
{
- Double d = (Double) limitVec.elementAt(i);
+ Double d = limitVec.elementAt(i);
choiceLimits[i] = d.doubleValue();
}
}
/* 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.
* Array containing the collation decomposition of the
* text given to the constructor.
*/
- private RuleBasedCollator.CollationElement[] text_decomposition;
+ private RuleBasedCollator.CollationElement[] textDecomposition;
/**
* 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>
RuleBasedCollator.CollationElement nextBlock()
{
- if (index >= text_decomposition.length)
+ if (index >= textDecomposition.length)
return null;
- RuleBasedCollator.CollationElement e = text_decomposition[index];
+ RuleBasedCollator.CollationElement e = textDecomposition[index];
- textIndex = text_indexes[index+1];
+ textIndex = textIndexes[index+1];
index++;
return null;
index--;
- RuleBasedCollator.CollationElement e = text_decomposition[index];
+ RuleBasedCollator.CollationElement e = textDecomposition[index];
- textIndex = text_indexes[index+1];
+ textIndex = textIndexes[index+1];
return e;
}
String work_text = text.intern();
- ArrayList a_element = new ArrayList();
- ArrayList a_idx = new ArrayList();
+ ArrayList<RuleBasedCollator.CollationElement> aElement = new ArrayList<RuleBasedCollator.CollationElement>();
+ ArrayList<Integer> aIdx = new ArrayList<Integer>();
// Build element collection ordered as they come in "text".
while (idx < work_text.length())
{
- String key, key_old;
+ String key, keyOld;
Object object = null;
int p = 1;
// IMPROVE: use a TreeMap with a prefix-ordering rule.
- key_old = key = null;
+ keyOld = key = null;
do
{
if (object != null)
- key_old = key;
+ keyOld = key;
key = work_text.substring (idx, idx+p);
object = collator.prefix_tree.get (key);
if (object != null && idx < alreadyExpanded)
prefix.expansion.startsWith(work_text.substring(0, idx)))
{
object = null;
- key = key_old;
+ key = keyOld;
}
}
p++;
while (idx+p <= work_text.length());
if (object == null)
- key = key_old;
+ key = keyOld;
RuleBasedCollator.CollationElement prefix =
(RuleBasedCollator.CollationElement) collator.prefix_tree.get (key);
RuleBasedCollator.CollationElement e =
collator.getDefaultAccentedElement (work_text.charAt (idx));
- a_element.add (e);
- a_idx.add (new Integer(idx_idx));
+ aElement.add (e);
+ aIdx.add (Integer.valueOf(idx_idx));
idx++;
alreadyExpanded--;
if (alreadyExpanded == 0)
/* This is a normal character. */
RuleBasedCollator.CollationElement e =
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
* string can be ordered.
*/
- a_element.add (RuleBasedCollator.SPECIAL_UNKNOWN_SEQ);
- a_idx.add (i_ref);
- a_element.add (e);
- a_idx.add (i_ref);
+ aElement.add (RuleBasedCollator.SPECIAL_UNKNOWN_SEQ);
+ aIdx.add (iRef);
+ aElement.add (e);
+ aIdx.add (iRef);
idx_idx++;
idx++;
}
work_text = prefix.expansion
+ work_text.substring (idx+prefix.key.length());
idx = 0;
- a_element.add (prefix);
- a_idx.add (new Integer(idx_idx));
+ aElement.add (prefix);
+ aIdx.add (Integer.valueOf(idx_idx));
if (alreadyExpanded == 0)
idxToMove = prefix.key.length();
alreadyExpanded += prefix.expansion.length()-prefix.key.length();
/* Third case: the simplest. We have got the prefix and it
* has not to be expanded.
*/
- a_element.add (prefix);
- a_idx.add (new Integer(idx_idx));
+ aElement.add (prefix);
+ aIdx.add (Integer.valueOf(idx_idx));
idx += prefix.key.length();
/* If the sequence is in an expansion, we must decrease the
* counter.
}
}
- text_decomposition = (RuleBasedCollator.CollationElement[])
- a_element.toArray(new RuleBasedCollator.CollationElement[a_element.size()]);
- text_indexes = new int[a_idx.size()+1];
- for (int i = 0; i < a_idx.size(); i++)
+ textDecomposition = aElement.toArray(new RuleBasedCollator.CollationElement[aElement.size()]);
+ textIndexes = new int[aIdx.size()+1];
+ for (int i = 0; i < aIdx.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();
}
/**
if (offset > (text.getEndIndex() - 1))
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;
}
/*
- * 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.
*/
- if (text_indexes[index] == offset)
+ if (textIndexes[index] == offset)
textIndex = offset;
else
- textIndex = text_indexes[index-1];
+ textIndex = textIndexes[index-1];
}
/**
import java.util.ServiceLoader;
import java.util.TimeZone;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.ConcurrentHashMap;
+
+import java.util.regex.Pattern;
+
import java.util.spi.TimeZoneNameProvider;
/**
*/
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.
*/
}
}
+ 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.
*/
for (int a = 0; a < bundles.size(); ++a)
{
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)
{
if (array.length > b && array[b] != null && data[b].isEmpty() && !array[b].isEmpty())
return data;
}
- private String[][] getZoneStrings(ResourceBundle res, Locale locale)
+ private static String[][] getZoneStrings(List<ResourceBundle> bundles, Locale locale)
{
List<String[]> allZones = new ArrayList<String[]>();
try
{
Map<String,String[]> systemZones = new HashMap<String,String[]>();
- while (true)
+ for (ResourceBundle bundle : bundles)
{
- int index = 0;
String country = locale.getCountry();
- String data = res.getString("zoneStrings");
- String[] zones = data.split("\u00a9");
+ String data = bundle.getString("zoneStrings");
+ String[] zones = ZONE_SEP.split(data);
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);
if (type == null)
type = properties.getProperty(strings[0] + ".DEFAULT");
}
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 */
for (String[] zstrings : systemZones.values())
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];
for (int i = 0; i < formatPrefixes.length; i++)
- values[i] = res.getString(formatPrefixes[i] + key);
+ values[i] = getString(bundles, formatPrefixes[i] + key);
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>
* by loading the date format information for the specified locale.
public DateFormatSymbols (Locale locale)
throws MissingResourceException
{
- 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();
- }
- 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);
+ DFSData data = retrieveData(locale);
+ ampms = data.getAMPMs();
+ eras = data.getEras();
+ localPatternChars = data.getLocalPatternChars();
+ months = data.getMonths();
+ shortMonths = data.getShortMonths();
+ weekdays = data.getWeekdays();
+ shortWeekdays = data.getShortWeekdays();
+ dateFormats = data.getDateFormats();
+ timeFormats = data.getTimeFormats();
+ runtimeZoneStrings = data.getZoneStrings();
}
/**
/* 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.
private boolean hasFractionalPattern;
/** 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
// add NumberFormat field attributes to the AttributedString
for (int i = 0; i < attributes.size(); i++)
{
- FieldPosition pos = (FieldPosition) attributes.get(i);
+ FieldPosition pos = attributes.get(i);
Format.Field attribute = pos.getFieldAttribute();
as.addAttribute(attribute, attribute, pos.getBeginIndex(),
/* 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.
public static final MessageFormat.Field ARGUMENT = new MessageFormat.Field("argument");
// For deserialization
- @SuppressWarnings("unused")
private Field()
{
super("");
/* 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.
This file is part of GNU Classpath.
* This constructor is only used by the deserializer. Without it,
* it would fail to construct a valid object.
*/
- @SuppressWarnings("unused")
private Field()
{
super("");
* @return an empty parameterized set.
* @since 1.5
*/
+ @SuppressWarnings("unchecked")
public static final <T> Set<T> emptySet()
{
- /* FIXME: Could this be optimized? */
- return new EmptySet<T>();
+ return (Set<T>) EMPTY_SET;
}
/**
* @return A non-iterating iterator.
*/
// This is really cheating! I think it's perfectly valid, though.
+ @SuppressWarnings("unchecked")
public Iterator<T> iterator()
{
return (Iterator<T>) EMPTY_LIST.iterator();
*/
public boolean equals(Object o)
{
- return o instanceof Set && ((Set) o).isEmpty();
+ return o instanceof Set<?> && ((Set<?>) o).isEmpty();
}
/**
* @return an empty parameterized list.
* @since 1.5
*/
+ @SuppressWarnings("unchecked")
public static final <T> List<T> emptyList()
{
- /* FIXME: Could this be optimized? */
- return new EmptyList<T>();
+ return (List<T>) EMPTY_LIST;
}
/**
*/
public boolean equals(Object o)
{
- return o instanceof List && ((List) o).isEmpty();
+ return o instanceof List<?> && ((List<?>) o).isEmpty();
}
/**
* @return an empty parameterized map.
* @since 1.5
*/
+ @SuppressWarnings("unchecked")
public static final <K,V> Map<K,V> emptyMap()
{
- /* FIXME: Could this be optimized? */
- return new EmptyMap<K,V>();
+ return (Map<K,V>) EMPTY_MAP;
}
/**
* There are no entries.
* @return The empty set.
*/
+ @SuppressWarnings("unchecked")
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
*/
public boolean equals(Object o)
{
- return o instanceof Map && ((Map) o).isEmpty();
+ return o instanceof Map<?,?> && ((Map<?,?>) o).isEmpty();
}
/**
* No entries.
* @return The empty set.
*/
+ @SuppressWarnings("unchecked")
public Set<K> keySet()
{
- return EMPTY_SET;
+ return (Set<K>) EMPTY_SET;
}
/**
* Collection, will work. Besides, that's what the JDK uses!
* @return The empty set.
*/
+ @SuppressWarnings("unchecked")
public Collection<V> values()
{
- return EMPTY_SET;
+ return (Collection<V>) EMPTY_SET;
}
/**
public List<T> subList(int from, int to)
{
if (from == to && (to == 0 || to == 1))
- return EMPTY_LIST;
+ return emptyList();
if (from == 0 && to == 1)
return this;
if (from > to)
* @throws ArrayStoreException if the type of any element of the
* 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)
{
conversion);
noPrecision(precision);
+ if (arg == null)
+ {
+ genericFormat("null", flags, width, precision);
+ return;
+ }
+
int theChar;
if (arg instanceof Character)
theChar = ((Character) arg).charValue();
int radix, char conversion)
{
assert radix == 8 || radix == 10 || radix == 16;
+
+ if (arg == null)
+ {
+ return new CPStringBuilder("null");
+ }
+
noPrecision(precision);
// Some error checking.
argumentIndex = previousArgumentIndex;
// Argument indices start at 1 but array indices at 0.
--argumentIndex;
- if (argumentIndex < 0 || argumentIndex >= args.length)
- throw new MissingFormatArgumentException(format.substring(start, index));
- argument = args[argumentIndex];
+ if (args != null)
+ {
+ if (argumentIndex < 0 || argumentIndex >= args.length)
+ throw new MissingFormatArgumentException(format.substring(start, index));
+ argument = args[argumentIndex];
+ }
}
switch (conversion)
/* 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.
This file is part of GNU Classpath.
/* Look up default timezone */
if (defaultZone0 == null)
{
- defaultZone0 = (TimeZone) AccessController.doPrivileged
- (new PrivilegedAction()
+ defaultZone0 = AccessController.doPrivileged
+ (new PrivilegedAction<TimeZone>()
{
- public Object run()
+ public TimeZone run()
{
TimeZone zone = null;
/**
* JDK 1.1.x compatibility aliases.
*/
- private static HashMap aliases0;
+ private static HashMap<String,String> aliases0;
/**
* HashMap for timezones by ID.
*/
- private static HashMap timezones0;
+ private static HashMap<String,TimeZone> timezones0;
/* initialize this static field lazily to overhead if
* it is not needed:
*/
// Package-private to avoid a trampoline.
- static HashMap timezones()
+ static HashMap<String,TimeZone> timezones()
{
if (timezones0 == null)
{
- HashMap timezones = new HashMap();
+ HashMap<String,TimeZone> timezones = new HashMap<String,TimeZone>();
timezones0 = timezones;
zoneinfo_dir = SystemProperties.getProperty("gnu.java.util.zoneinfo.dir");
if (zoneinfo_dir != null)
{
- aliases0 = new HashMap();
+ aliases0 = new HashMap<String,String>();
// These deprecated aliases for JDK 1.1.x compatibility
// should take precedence over data files read from
{
synchronized (TimeZone.class)
{
- tz = (TimeZone) timezones().get(ID);
+ tz = timezones().get(ID);
if (tz != null)
{
if (!tz.getID().equals(ID))
// aliases0 is never changing after first timezones(), so should
// be safe without synchronization.
- String zonename = (String) aliases0.get(ID);
+ String zonename = aliases0.get(ID);
if (zonename == null)
zonename = ID;
{
synchronized (TimeZone.class)
{
- HashMap h = timezones();
+ HashMap<String,TimeZone> h = timezones();
int count = 0;
if (zoneinfo_dir == null)
{
- Iterator iter = h.entrySet().iterator();
+ Iterator<Map.Entry<String,TimeZone>> iter = h.entrySet().iterator();
while (iter.hasNext())
{
// Don't iterate the values, since we want to count
// doubled values (aliases)
- Map.Entry entry = (Map.Entry) iter.next();
- if (((TimeZone) entry.getValue()).getRawOffset() == rawOffset)
+ Map.Entry<String,TimeZone> entry = iter.next();
+ if (entry.getValue().getRawOffset() == rawOffset)
count++;
}
iter = h.entrySet().iterator();
while (iter.hasNext())
{
- Map.Entry entry = (Map.Entry) iter.next();
- if (((TimeZone) entry.getValue()).getRawOffset() == rawOffset)
+ Map.Entry<String,TimeZone> entry = iter.next();
+ if (entry.getValue().getRawOffset() == rawOffset)
ids[count++] = (String) entry.getKey();
}
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();
int count = files.length;
{
synchronized (TimeZone.class)
{
- HashMap h = timezones();
+ HashMap<String,TimeZone> h = timezones();
if (zoneinfo_dir == null)
- return (String[]) h.keySet().toArray(new String[h.size()]);
+ return h.keySet().toArray(new String[h.size()]);
if (availableIDs != null)
{
}
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();
availableIDs = new String[count];
String[] ids = new String[count];
count = 0;
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++)
if (s[j] != null)
{
}
}
- Iterator iter = aliases0.entrySet().iterator();
+ Iterator<Map.Entry<String,String>> iter = aliases0.entrySet().iterator();
while (iter.hasNext())
{
- Map.Entry entry = (Map.Entry) iter.next();
- availableIDs[count] = (String) entry.getKey();
- ids[count++] = (String) entry.getKey();
+ Map.Entry<String,String> entry = iter.next();
+ availableIDs[count] = entry.getKey();
+ ids[count++] = entry.getKey();
}
return ids;
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 replacement The replacement string
*
* @param s the string to literalize.
* @return the literalized string.
- *Â @since 1.5
+ * @since 1.5
*/
public static String quoteReplacement(String s)
{
* flavor
*/
// Raw types enforced as part of spec.
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public ActivationDataFlavor(Class representationClass, String mimeType,
String humanPresentableName)
{
* flavor
*/
// Raw types enforced as part of spec.
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public ActivationDataFlavor(Class representationClass,
String humanPresentableName)
{
}
// Raw types enforced as part of spec.
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public Class getRepresentationClass()
{
return representationClass;
* Returns an enumeration of all the parameter names.
*/
// Raw type is forced by public spec.
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public synchronized Enumeration getNames()
{
return new IteratorEnumeration(parameterNames.iterator());
* to load the class.
*/
// API issue with lack of <?> on Class
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public static Class loadClass(String name)
throws ClassNotFoundException
{
* to load the class.
*/
// API issue with lack of <?> on Class
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public static Class loadClassWithout(ClassLoader exclude, String name)
throws ClassNotFoundException
{
* @param cons the constructor.
*/
// API issue with lack of <?> on Constructor
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public MBeanConstructorInfo(String desc, Constructor cons)
{
super(cons.getName(), desc);
* NotificationFilter,
* Object)
*/
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
void addNotificationListener(ObjectName name, ObjectName listener,
MarshalledObject filter, MarshalledObject passback,
Subject delegationSubject)
* NotificationFilter,
* Object)
*/
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
Integer[] addNotificationListeners(ObjectName[] names, MarshalledObject[] filters,
Subject[] delegationSubjects)
throws InstanceNotFoundException, IOException;
* @throws IOException if an I/O error occurred in communicating with
* the bean server.
*/
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
ObjectInstance createMBean(String className, ObjectName name,
MarshalledObject params, String[] sig,
Subject delegationSubject)
* @throws IOException if an I/O error occurred in communicating with
* the bean server.
*/
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
ObjectInstance createMBean(String className, ObjectName name,
ObjectName loaderName, MarshalledObject params,
String[] sig, Subject delegationSubject)
* the bean server.
* @see DynamicMBean#invoke(String, Object[], String[])
*/
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
Object invoke(ObjectName bean, String name, MarshalledObject params,
String[] sig, Subject delegationSubject)
throws InstanceNotFoundException, MBeanException,
* @throws SecurityException if the client or delegated subject (if any) does
* not have permission to invoke this operation.
*/
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
Set<ObjectInstance> queryMBeans(ObjectName name, MarshalledObject query,
Subject delegationSubject)
throws IOException;
* @throws IOException if an I/O error occurred in communicating with
* the bean server.
*/
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
Set<ObjectName> queryNames(ObjectName name, MarshalledObject query,
Subject delegationSubject)
throws IOException;
* NotificationFilter,
* Object)
*/
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
void removeNotificationListener(ObjectName name,
ObjectName listener,
MarshalledObject filter,
* @see #getAttribute(ObjectName, String, Subject)
* @see javax.management.DynamicMBean#setAttribute(Attribute)
*/
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
void setAttribute(ObjectName name, MarshalledObject attribute,
Subject delegationSubject)
throws InstanceNotFoundException, AttributeNotFoundException,
* @see #getAttributes(ObjectName, String[])
* @see DynamicMBean#setAttributes(AttributeList)
*/
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
AttributeList setAttributes(ObjectName name, MarshalledObject attributes,
Subject delegationSubject)
throws InstanceNotFoundException, ReflectionException,
*/
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 SERVER_FACTORY_SVC = "SaslServerFactory.";
private static final String ALIAS = "Alg.Alias.";
// Now compute the length representation
long buffer = length & 0x7F;
- while ((length >>= 7) > 0)
+ // Avoid altering length variable; PR42551
+ lengthValue = length;
+ while ((lengthValue >>= 7) > 0)
{
buffer <<= 8;
- buffer |= ((length & 0x7F) | 0x80);
+ buffer |= ((lengthValue & 0x7F) | 0x80);
}
// Now store the variable length length value
*
*/
public interface MidiDevice
+ extends AutoCloseable
{
/**
* Get the Info object describing this device.
/* 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.
*/
public static MidiDevice.Info[] getMidiDeviceInfo()
{
- Iterator deviceProviders =
+ Iterator<MidiDeviceProvider> deviceProviders =
ServiceFactory.lookupProviders(MidiDeviceProvider.class);
- List infoList = new ArrayList();
+ List<MidiDevice.Info> infoList = new ArrayList<MidiDevice.Info>();
while (deviceProviders.hasNext())
{
infoList.add(infos[--i]);
}
- return (MidiDevice.Info[])
- infoList.toArray(new MidiDevice.Info[infoList.size()]);
+ return infoList.toArray(new MidiDevice.Info[infoList.size()]);
}
/**
public static MidiDevice getMidiDevice(MidiDevice.Info info)
throws MidiUnavailableException
{
- Iterator deviceProviders =
+ Iterator<MidiDeviceProvider> deviceProviders =
ServiceFactory.lookupProviders(MidiDeviceProvider.class);
if (! deviceProviders.hasNext())
public static Soundbank getSoundbank(InputStream stream)
throws InvalidMidiDataException, IOException
{
- Iterator readers = ServiceFactory.lookupProviders(SoundbankReader.class);
+ Iterator<SoundbankReader> readers =
+ ServiceFactory.lookupProviders(SoundbankReader.class);
while (readers.hasNext())
{
- SoundbankReader sr = (SoundbankReader) readers.next();
+ SoundbankReader sr = readers.next();
Soundbank sb = sr.getSoundbank(stream);
if (sb != null)
return sb;
public static Soundbank getSoundbank(URL url)
throws InvalidMidiDataException, IOException
{
- Iterator readers = ServiceFactory.lookupProviders(SoundbankReader.class);
+ Iterator<SoundbankReader> readers =
+ ServiceFactory.lookupProviders(SoundbankReader.class);
while (readers.hasNext())
{
- SoundbankReader sr = (SoundbankReader) readers.next();
+ SoundbankReader sr = readers.next();
Soundbank sb = sr.getSoundbank(url);
if (sb != null)
return sb;
public static Soundbank getSoundbank(File file)
throws InvalidMidiDataException, IOException
{
- Iterator readers = ServiceFactory.lookupProviders(SoundbankReader.class);
+ Iterator<SoundbankReader> readers =
+ ServiceFactory.lookupProviders(SoundbankReader.class);
while (readers.hasNext())
{
SoundbankReader sr = (SoundbankReader) readers.next();
public static MidiFileFormat getMidiFileFormat(InputStream stream)
throws InvalidMidiDataException, IOException
{
- Iterator readers = ServiceFactory.lookupProviders(MidiFileReader.class);
+ Iterator<MidiFileReader> readers =
+ ServiceFactory.lookupProviders(MidiFileReader.class);
while (readers.hasNext())
{
- MidiFileReader sr = (MidiFileReader) readers.next();
+ MidiFileReader sr = readers.next();
MidiFileFormat sb = sr.getMidiFileFormat(stream);
if (sb != null)
return sb;
public static MidiFileFormat getMidiFileFormat(URL url)
throws InvalidMidiDataException, IOException
{
- Iterator readers = ServiceFactory.lookupProviders(MidiFileReader.class);
+ Iterator<MidiFileReader> readers =
+ ServiceFactory.lookupProviders(MidiFileReader.class);
while (readers.hasNext())
{
- MidiFileReader sr = (MidiFileReader) readers.next();
+ MidiFileReader sr = readers.next();
MidiFileFormat sb = sr.getMidiFileFormat(url);
if (sb != null)
return sb;
public static MidiFileFormat getMidiFileFormat(File file)
throws InvalidMidiDataException, IOException
{
- Iterator readers = ServiceFactory.lookupProviders(MidiFileReader.class);
+ Iterator<MidiFileReader> readers =
+ ServiceFactory.lookupProviders(MidiFileReader.class);
while (readers.hasNext())
{
- MidiFileReader sr = (MidiFileReader) readers.next();
+ MidiFileReader sr = readers.next();
MidiFileFormat sb = sr.getMidiFileFormat(file);
if (sb != null)
return sb;
public static Sequence getSequence(InputStream stream)
throws InvalidMidiDataException, IOException
{
- Iterator readers = ServiceFactory.lookupProviders(MidiFileReader.class);
+ Iterator<MidiFileReader> readers =
+ ServiceFactory.lookupProviders(MidiFileReader.class);
while (readers.hasNext())
{
- MidiFileReader sr = (MidiFileReader) readers.next();
+ MidiFileReader sr = readers.next();
Sequence sq = sr.getSequence(stream);
if (sq != null)
return sq;
public static Sequence getSequence(URL url)
throws InvalidMidiDataException, IOException
{
- Iterator readers = ServiceFactory.lookupProviders(MidiFileReader.class);
+ Iterator<MidiFileReader> readers =
+ ServiceFactory.lookupProviders(MidiFileReader.class);
while (readers.hasNext())
{
- MidiFileReader sr = (MidiFileReader) readers.next();
+ MidiFileReader sr = readers.next();
Sequence sq = sr.getSequence(url);
if (sq != null)
return sq;
public static Sequence getSequence(File file)
throws InvalidMidiDataException, IOException
{
- Iterator readers = ServiceFactory.lookupProviders(MidiFileReader.class);
+ Iterator<MidiFileReader> readers =
+ ServiceFactory.lookupProviders(MidiFileReader.class);
while (readers.hasNext())
{
- MidiFileReader sr = (MidiFileReader) readers.next();
+ MidiFileReader sr = readers.next();
Sequence sq = sr.getSequence(file);
if (sq != null)
return sq;
boolean supported[] = new boolean[3];
// The number of supported formats.
int count = 0;
- Iterator writers = ServiceFactory.lookupProviders(MidiFileWriter.class);
+ Iterator<MidiFileWriter> writers =
+ ServiceFactory.lookupProviders(MidiFileWriter.class);
while (writers.hasNext())
{
- MidiFileWriter fw = (MidiFileWriter) writers.next();
+ MidiFileWriter fw = writers.next();
int types[] = fw.getMidiFileTypes();
for (int i = types.length; i > 0;)
{
*/
public static boolean isFileTypeSupported(int fileType)
{
- Iterator writers = ServiceFactory.lookupProviders(MidiFileWriter.class);
+ Iterator<MidiFileWriter> writers = ServiceFactory.lookupProviders(MidiFileWriter.class);
while (writers.hasNext())
{
- MidiFileWriter fw = (MidiFileWriter) writers.next();
+ MidiFileWriter fw = writers.next();
if (fw.isFileTypeSupported(fileType))
return true;
boolean supported[] = new boolean[3];
// The number of supported formats.
int count = 0;
- Iterator writers = ServiceFactory.lookupProviders(MidiFileWriter.class);
+ Iterator<MidiFileWriter> writers = ServiceFactory.lookupProviders(MidiFileWriter.class);
while (writers.hasNext())
{
MidiFileWriter fw = (MidiFileWriter) writers.next();
*/
public static boolean isFileTypeSupported(int fileType, Sequence sequence)
{
- Iterator writers = ServiceFactory.lookupProviders(MidiFileWriter.class);
+ Iterator<MidiFileWriter> writers = ServiceFactory.lookupProviders(MidiFileWriter.class);
while (writers.hasNext())
{
MidiFileWriter fw = (MidiFileWriter) writers.next();
public static int write(Sequence in, int fileType, OutputStream out)
throws IOException
{
- Iterator writers = ServiceFactory.lookupProviders(MidiFileWriter.class);
+ Iterator<MidiFileWriter> writers = ServiceFactory.lookupProviders(MidiFileWriter.class);
while (writers.hasNext())
{
MidiFileWriter fw = (MidiFileWriter) writers.next();
public static int write(Sequence in, int fileType, File out)
throws IOException
{
- Iterator writers = ServiceFactory.lookupProviders(MidiFileWriter.class);
+ Iterator<MidiFileWriter> writers = ServiceFactory.lookupProviders(MidiFileWriter.class);
while (writers.hasNext())
{
MidiFileWriter fw = (MidiFileWriter) writers.next();
*
*/
public interface Receiver
+ extends AutoCloseable
{
/**
* Send a MIDI message and timestamp. Some receivers don't support
/* 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.
{
private final Soundbank soundbank;
private final String name;
- private final Class dataClass;
+ private final Class<?> dataClass;
/**
* Create a SoundbankResource object.
/* 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.
/**
* The list of MidiEvents for this track.
*/
- Vector events = new Vector();
+ Vector<MidiEvent> events = new Vector<MidiEvent>();
// A HashSet to speed processing
- private HashSet eventSet = new HashSet();
+ private HashSet<MidiEvent> eventSet = new HashSet<MidiEvent>();
// This is only instantiable within this package.
Track()
long targetTick = event.getTick();
int i = events.size() - 1;
- while (i >= 0 && (((MidiEvent)events.get(i)).getTick() > targetTick))
+ while (i >= 0 && (events.get(i).getTick() > targetTick))
i--;
events.add(i+1, event);
return true;
{
try
{
- return (MidiEvent) events.get(index);
+ return events.get(index);
}
catch (IndexOutOfBoundsException e)
{
synchronized (events)
{
int size = events.size();
- return ((MidiEvent) events.get(size - 1)).getTick();
+ return events.get(size - 1).getTick();
}
}
}
*
*/
public interface Transmitter
+ extends AutoCloseable
{
/**
* Set the Receiver to which MIDI events will be sent.
/* 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.
public static AudioFileFormat getAudioFileFormat(File f)
throws UnsupportedAudioFileException, IOException
{
- Iterator i = ServiceFactory.lookupProviders(AudioFileReader.class);
+ Iterator<AudioFileReader> i = ServiceFactory.lookupProviders(AudioFileReader.class);
while (i.hasNext())
{
- AudioFileReader reader = (AudioFileReader) i.next();
+ AudioFileReader reader = i.next();
try
{
return reader.getAudioFileFormat(f);
public static AudioFileFormat getAudioFileFormat(InputStream is)
throws UnsupportedAudioFileException, IOException
{
- Iterator i = ServiceFactory.lookupProviders(AudioFileReader.class);
+ Iterator<AudioFileReader> i = ServiceFactory.lookupProviders(AudioFileReader.class);
while (i.hasNext())
{
- AudioFileReader reader = (AudioFileReader) i.next();
+ AudioFileReader reader = i.next();
try
{
return reader.getAudioFileFormat(is);
public static AudioFileFormat getAudioFileFormat(URL url)
throws UnsupportedAudioFileException, IOException
{
- Iterator i = ServiceFactory.lookupProviders(AudioFileReader.class);
+ Iterator<AudioFileReader> i = ServiceFactory.lookupProviders(AudioFileReader.class);
while (i.hasNext())
{
- AudioFileReader reader = (AudioFileReader) i.next();
+ AudioFileReader reader = i.next();
try
{
return reader.getAudioFileFormat(url);
{
HashSet<AudioFileFormat.Type> result
= new HashSet<AudioFileFormat.Type>();
- Iterator i = ServiceFactory.lookupProviders(AudioFileWriter.class);
+ Iterator<AudioFileWriter> i = ServiceFactory.lookupProviders(AudioFileWriter.class);
while (i.hasNext())
{
- AudioFileWriter writer = (AudioFileWriter) i.next();
+ AudioFileWriter writer = i.next();
AudioFileFormat.Type[] types = writer.getAudioFileTypes();
for (int j = 0; j < types.length; ++j)
result.add(types[j]);
{
HashSet<AudioFileFormat.Type> result
= new HashSet<AudioFileFormat.Type>();
- Iterator i = ServiceFactory.lookupProviders(AudioFileWriter.class);
+ Iterator<AudioFileWriter> i = ServiceFactory.lookupProviders(AudioFileWriter.class);
while (i.hasNext())
{
- AudioFileWriter writer = (AudioFileWriter) i.next();
+ AudioFileWriter writer = i.next();
AudioFileFormat.Type[] types = writer.getAudioFileTypes(ais);
for (int j = 0; j < types.length; ++j)
result.add(types[j]);
public static AudioInputStream getAudioInputStream(AudioFormat.Encoding targ,
AudioInputStream ais)
{
- Iterator i = ServiceFactory.lookupProviders(FormatConversionProvider.class);
+ Iterator<FormatConversionProvider> i =
+ ServiceFactory.lookupProviders(FormatConversionProvider.class);
while (i.hasNext())
{
- FormatConversionProvider prov = (FormatConversionProvider) i.next();
+ FormatConversionProvider prov = i.next();
if (! prov.isConversionSupported(targ, ais.getFormat()))
continue;
return prov.getAudioInputStream(targ, ais);
public static AudioInputStream getAudioInputStream(AudioFormat targ,
AudioInputStream ais)
{
- Iterator i = ServiceFactory.lookupProviders(FormatConversionProvider.class);
+ Iterator<FormatConversionProvider> i =
+ ServiceFactory.lookupProviders(FormatConversionProvider.class);
while (i.hasNext())
{
- FormatConversionProvider prov = (FormatConversionProvider) i.next();
+ FormatConversionProvider prov = i.next();
if (! prov.isConversionSupported(targ, ais.getFormat()))
continue;
return prov.getAudioInputStream(targ, ais);
public static AudioInputStream getAudioInputStream(File f)
throws UnsupportedAudioFileException, IOException
{
- Iterator i = ServiceFactory.lookupProviders(AudioFileReader.class);
+ Iterator<AudioFileReader> i = ServiceFactory.lookupProviders(AudioFileReader.class);
while (i.hasNext())
{
- AudioFileReader reader = (AudioFileReader) i.next();
+ AudioFileReader reader = i.next();
try
{
return reader.getAudioInputStream(f);
public static AudioInputStream getAudioInputStream(InputStream is)
throws UnsupportedAudioFileException, IOException
{
- Iterator i = ServiceFactory.lookupProviders(AudioFileReader.class);
+ Iterator<AudioFileReader> i = ServiceFactory.lookupProviders(AudioFileReader.class);
while (i.hasNext())
{
- AudioFileReader reader = (AudioFileReader) i.next();
+ AudioFileReader reader = i.next();
try
{
return reader.getAudioInputStream(is);
public static AudioInputStream getAudioInputStream(URL url)
throws UnsupportedAudioFileException, IOException
{
- Iterator i = ServiceFactory.lookupProviders(AudioFileReader.class);
+ Iterator<AudioFileReader> i = ServiceFactory.lookupProviders(AudioFileReader.class);
while (i.hasNext())
{
- AudioFileReader reader = (AudioFileReader) i.next();
+ AudioFileReader reader = i.next();
try
{
return reader.getAudioInputStream(url);
*/
public static Mixer getMixer(Mixer.Info info)
{
- Iterator i = ServiceFactory.lookupProviders(MixerProvider.class);
+ Iterator<MixerProvider> i = ServiceFactory.lookupProviders(MixerProvider.class);
while (i.hasNext())
{
- MixerProvider prov = (MixerProvider) i.next();
+ MixerProvider prov = i.next();
if (prov.isMixerSupported(info))
return prov.getMixer(info);
}
public static Mixer.Info[] getMixerInfo()
{
HashSet<Mixer.Info> result = new HashSet<Mixer.Info>();
- Iterator i = ServiceFactory.lookupProviders(MixerProvider.class);
+ Iterator<MixerProvider> i = ServiceFactory.lookupProviders(MixerProvider.class);
while (i.hasNext())
{
- MixerProvider prov = (MixerProvider) i.next();
+ MixerProvider prov = i.next();
Mixer.Info[] is = prov.getMixerInfo();
for (int j = 0; j < is.length; ++j)
result.add(is[j]);
{
HashSet<AudioFormat.Encoding> result
= new HashSet<AudioFormat.Encoding>();
- Iterator i = ServiceFactory.lookupProviders(FormatConversionProvider.class);
+ Iterator<FormatConversionProvider> i =
+ ServiceFactory.lookupProviders(FormatConversionProvider.class);
while (i.hasNext())
{
- FormatConversionProvider prov = (FormatConversionProvider) i.next();
+ FormatConversionProvider prov = i.next();
if (! prov.isSourceEncodingSupported(source))
continue;
AudioFormat.Encoding[] es = prov.getTargetEncodings();
{
HashSet<AudioFormat.Encoding> result
= new HashSet<AudioFormat.Encoding>();
- Iterator i = ServiceFactory.lookupProviders(FormatConversionProvider.class);
+ Iterator<FormatConversionProvider> i =
+ ServiceFactory.lookupProviders(FormatConversionProvider.class);
while (i.hasNext())
{
- FormatConversionProvider prov = (FormatConversionProvider) i.next();
+ FormatConversionProvider prov = i.next();
AudioFormat.Encoding[] es = prov.getTargetEncodings(source);
for (int j = 0; j < es.length; ++j)
result.add(es[j]);
AudioFormat sourceFmt)
{
HashSet<AudioFormat> result = new HashSet<AudioFormat>();
- Iterator i = ServiceFactory.lookupProviders(FormatConversionProvider.class);
+ Iterator<FormatConversionProvider> i =
+ ServiceFactory.lookupProviders(FormatConversionProvider.class);
while (i.hasNext())
{
- FormatConversionProvider prov = (FormatConversionProvider) i.next();
+ FormatConversionProvider prov = i.next();
AudioFormat[] es = prov.getTargetFormats(encoding, sourceFmt);
for (int j = 0; j < es.length; ++j)
result.add(es[j]);
public static boolean isConversionSupported(AudioFormat.Encoding targ,
AudioFormat source)
{
- Iterator i
+ Iterator<FormatConversionProvider> i
= ServiceFactory.lookupProviders(FormatConversionProvider.class);
while (i.hasNext())
{
- FormatConversionProvider prov = (FormatConversionProvider) i.next();
+ FormatConversionProvider prov = i.next();
if (prov.isConversionSupported(targ, source))
return true;
}
public static boolean isConversionSupported(AudioFormat targ,
AudioFormat source)
{
- Iterator i
+ Iterator<FormatConversionProvider> i
= ServiceFactory.lookupProviders(FormatConversionProvider.class);
while (i.hasNext())
{
- FormatConversionProvider prov = (FormatConversionProvider) i.next();
+ FormatConversionProvider prov = i.next();
if (prov.isConversionSupported(targ, source))
return true;
}
File out)
throws IOException
{
- Iterator i = ServiceFactory.lookupProviders(AudioFileWriter.class);
+ Iterator<AudioFileWriter> i = ServiceFactory.lookupProviders(AudioFileWriter.class);
while (i.hasNext())
{
- AudioFileWriter w = (AudioFileWriter) i.next();
+ AudioFileWriter w = i.next();
if (w.isFileTypeSupported(type, ais))
return w.write(ais, type, out);
}
OutputStream os)
throws IOException
{
- Iterator i = ServiceFactory.lookupProviders(AudioFileWriter.class);
+ Iterator<AudioFileWriter> i = ServiceFactory.lookupProviders(AudioFileWriter.class);
while (i.hasNext())
{
- AudioFileWriter w = (AudioFileWriter) i.next();
+ AudioFileWriter w = i.next();
if (w.isFileTypeSupported(type, ais))
return w.write(ais, type, os);
}
/* 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.
* @since 1.3
*/
public interface Line
+ extends AutoCloseable
{
/**
* An object of this type holds information about a Line.
*/
class Info
{
- private Class klass;
+ private Class<?> klass;
/**
* Create a new Info object. The argument is the class of the line,
*
* @return an enumeration of tree nodes
*/
- @SuppressWarnings("unchecked") // Required for API compatibility
+ @SuppressWarnings("rawtypes") // Required for API compatibility
public Enumeration children()
{
if (children.size() == 0)
*
* @return Enumeration
*/
- @SuppressWarnings("unchecked") // Required for API compatibility
+ @SuppressWarnings("rawtypes") // Required for API compatibility
public Enumeration preorderEnumeration()
{
return new PreorderEnumeration(this);
*
* @return Enumeration
*/
- @SuppressWarnings("unchecked") // Required for API compatibility
+ @SuppressWarnings("rawtypes") // Required for API compatibility
public Enumeration postorderEnumeration()
{
return new PostorderEnumeration(this);
*
* @return Enumeration
*/
- @SuppressWarnings("unchecked") // Required for API compatibility
+ @SuppressWarnings("rawtypes") // Required for API compatibility
public Enumeration breadthFirstEnumeration()
{
return new BreadthFirstEnumeration(this);
*
* @return Enumeration
*/
- @SuppressWarnings("unchecked") // Required for API compatibility
+ @SuppressWarnings("rawtypes") // Required for API compatibility
public Enumeration depthFirstEnumeration()
{
return postorderEnumeration();
*
* @return Enumeration
*/
- @SuppressWarnings("unchecked") // Required for API compatibility
+ @SuppressWarnings("rawtypes") // Required for API compatibility
public Enumeration pathFromAncestorEnumeration(TreeNode node)
{
if (node == null)
return !queue.isEmpty();
}
- @SuppressWarnings("unchecked")
public TreeNode nextElement()
{
if (queue.isEmpty())
TreeNode node = queue.removeFirst();
+ @SuppressWarnings("unchecked")
Enumeration<TreeNode> children =
(Enumeration<TreeNode>) node.children();
while (children.hasMoreElements())
Stack<Enumeration<TreeNode>> childrenEnums =
new Stack<Enumeration<TreeNode>>();
- @SuppressWarnings("unchecked")
PreorderEnumeration(TreeNode node)
{
next = node;
- childrenEnums.push((Enumeration<TreeNode>) node.children());
+ @SuppressWarnings("unchecked")
+ Enumeration<TreeNode> children =
+ (Enumeration<TreeNode>) node.children();
+ childrenEnums.push(children);
}
public boolean hasMoreElements()
return current;
}
- @SuppressWarnings("unchecked")
private TreeNode traverse(Enumeration<TreeNode> children)
{
// If more children are available step down.
if (children.hasMoreElements())
{
TreeNode child = children.nextElement();
- childrenEnums.push((Enumeration<TreeNode>) child.children());
+ @SuppressWarnings("unchecked")
+ Enumeration<TreeNode> grandchildren =
+ (Enumeration<TreeNode>) child.children();
+ childrenEnums.push(grandchildren);
return child;
}
Stack<Enumeration<TreeNode>> childrenEnums =
new Stack<Enumeration<TreeNode>>();
- @SuppressWarnings("unchecked")
PostorderEnumeration(TreeNode node)
{
nodes.push(node);
- childrenEnums.push((Enumeration<TreeNode>) node.children());
+ @SuppressWarnings("unchecked")
+ Enumeration<TreeNode> children =
+ (Enumeration<TreeNode>) node.children();
+ childrenEnums.push(children);
}
public boolean hasMoreElements()
return traverse(children);
}
- @SuppressWarnings("unchecked")
private TreeNode traverse(Enumeration<TreeNode> children)
{
if (children.hasMoreElements())
TreeNode node = children.nextElement();
nodes.push(node);
- Enumeration<TreeNode> newChildren =
- (Enumeration<TreeNode>) node.children();
+ @SuppressWarnings("unchecked")
+ Enumeration<TreeNode> newChildren =
+ (Enumeration<TreeNode>) node.children();
childrenEnums.push(newChildren);
return traverse(newChildren);
*
* @return An enumeration of the children of this node.
*/
- @SuppressWarnings("unchecked") // Required for API compatibility
+ @SuppressWarnings("rawtypes") // Required for API compatibility
Enumeration children();
}
/**
* Returns all the prefixes currently bound to the given namespace URI.
*/
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public Iterator getPrefixes(String namespaceURI);
}
/**
* Create a start-element event.
*/
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public abstract StartElement createStartElement(QName name,
Iterator attributes,
Iterator namespaces);
/**
* Create a start-element event.
*/
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public abstract StartElement createStartElement(String prefix,
String namespaceUri,
String localName,
/**
* Create a start-element event.
*/
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public abstract StartElement createStartElement(String prefix,
String namespaceUri,
String localName,
/**
* Create an end-element event.
*/
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public abstract EndElement createEndElement(QName name,
Iterator namespaces);
/**
* Create an end-element event.
*/
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
public abstract EndElement createEndElement(String prefix,
String namespaceUri,
String localName,
/**
* An XML parser.
*/
-@SuppressWarnings("unchecked")
+@SuppressWarnings("rawtypes")
public interface XMLEventReader
extends Iterator
{
/**
* Returns the notations declared in the DTD.
*/
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
List getNotations();
/**
* Returns the entities declared in the DTD.
*/
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
List getEntities();
}
/**
* Returns the namespaces that have gone out of scope.
*/
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
Iterator getNamespaces();
}
/**
* Returns the attributes declared on this element.
*/
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
Iterator getAttributes();
/**
* Returns the namespaces declared on this element.
*/
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
Iterator getNamespaces();
/**
* Evaluate the function with the specified arguments.
* @param args the list of arguments
*/
- @SuppressWarnings("unchecked")
+ @SuppressWarnings("rawtypes")
Object evaluate(List args)
throws XPathFunctionException;
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.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/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.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) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
+MOC4 = @MOC4@
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
MOZILLA_LIBS = @MOZILLA_LIBS@
NM = @NM@
AC_DEFUN_ONCE([AC_PROG_JAVAC],[
AC_REQUIRE([AC_EXEEXT])dnl
-ECJ_OPTS="-warn:-deprecation,serial,unusedImport"
+ECJ_OPTS="-warn:-deprecation,serial,unusedImport,unusedPrivate,resource"
JAVAC_OPTS="-Xlint:unchecked,cast,divzero,empty,finally,overrides"
GCJ_OPTS="-g"
if test "x$JAVAPREFIX" = x; then
case ${gjdoc_version} in
0.7.9) ;;
0.8*) ;;
+ 0.9*) ;;
+ 1*) ;;
*) AC_MSG_ERROR([Building documentation requires GJDoc >= 0.7.9, ${gjdoc_version} found.]) ;;
esac
fi
--- /dev/null
+# lib-ld.m4 serial 4 (gettext-0.18)
+dnl Copyright (C) 1996-2003, 2009-2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Subroutines of libtool.m4,
+dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
+dnl with libtool.m4.
+
+dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
+AC_DEFUN([AC_LIB_PROG_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ acl_cv_prog_gnu_ld=yes ;;
+*)
+ acl_cv_prog_gnu_ld=no ;;
+esac])
+with_gnu_ld=$acl_cv_prog_gnu_ld
+])
+
+dnl From libtool-1.4. Sets the variable LD.
+AC_DEFUN([AC_LIB_PROG_LD],
+[AC_ARG_WITH([gnu-ld],
+[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by GCC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]* | [A-Za-z]:[\\/]*)]
+ [re_direlt='/[^/][^/]*/\.\./']
+ # Canonicalize the path of ld
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL([acl_cv_path_LD],
+[if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ acl_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break ;;
+ *)
+ test "$with_gnu_ld" != yes && break ;;
+ esac
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT([$LD])
+else
+ AC_MSG_RESULT([no])
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_LIB_PROG_LD_GNU
+])
--- /dev/null
+# lib-link.m4 serial 21 (gettext-0.18)
+dnl Copyright (C) 2001-2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_PREREQ([2.54])
+
+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
+dnl augments the CPPFLAGS variable.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ pushdef([Name],[translit([$1],[./-], [___])])
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+ ac_cv_lib[]Name[]_libs="$LIB[]NAME"
+ ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
+ ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
+ ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
+ ])
+ LIB[]NAME="$ac_cv_lib[]Name[]_libs"
+ LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
+ INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+ LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ AC_SUBST([LIB]NAME[_PREFIX])
+ dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
+ dnl results of this search when this library appears as a dependency.
+ HAVE_LIB[]NAME=yes
+ popdef([NAME])
+ popdef([Name])
+])
+
+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
+dnl searches for libname and the libraries corresponding to explicit and
+dnl implicit dependencies, together with the specified include files and
+dnl the ability to compile and link the specified testcode. The missing-message
+dnl defaults to 'no' and may contain additional hints for the user.
+dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
+dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ pushdef([Name],[translit([$1],[./-], [___])])
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+
+ dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+
+ dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed lib[]Name and not disabled its use
+ dnl via --without-lib[]Name-prefix, he wants to use it.
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+
+ AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
+ ac_save_LIBS="$LIBS"
+ dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
+ dnl because these -l options might require -L options that are present in
+ dnl LIBS. -l options benefit only from the -L options listed before it.
+ dnl Otherwise, add it to the front of LIBS, because it may be a static
+ dnl library that depends on another static library that is present in LIBS.
+ dnl Static libraries benefit only from the static libraries listed after
+ dnl it.
+ case " $LIB[]NAME" in
+ *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
+ *) LIBS="$LIB[]NAME $LIBS" ;;
+ esac
+ AC_TRY_LINK([$3], [$4],
+ [ac_cv_lib[]Name=yes],
+ [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
+ LIBS="$ac_save_LIBS"
+ ])
+ if test "$ac_cv_lib[]Name" = yes; then
+ HAVE_LIB[]NAME=yes
+ AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
+ AC_MSG_CHECKING([how to link with lib[]$1])
+ AC_MSG_RESULT([$LIB[]NAME])
+ else
+ HAVE_LIB[]NAME=no
+ dnl If $LIB[]NAME didn't lead to a usable library, we don't need
+ dnl $INC[]NAME either.
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LIB[]NAME=
+ LTLIB[]NAME=
+ LIB[]NAME[]_PREFIX=
+ fi
+ AC_SUBST([HAVE_LIB]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ AC_SUBST([LIB]NAME[_PREFIX])
+ popdef([NAME])
+ popdef([Name])
+])
+
+dnl Determine the platform dependent parameters needed to use rpath:
+dnl acl_libext,
+dnl acl_shlibext,
+dnl acl_hardcode_libdir_flag_spec,
+dnl acl_hardcode_libdir_separator,
+dnl acl_hardcode_direct,
+dnl acl_hardcode_minus_L.
+AC_DEFUN([AC_LIB_RPATH],
+[
+ dnl Tell automake >= 1.10 to complain if config.rpath is missing.
+ m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
+ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
+ AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
+ AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
+ AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+ . ./conftest.sh
+ rm -f ./conftest.sh
+ acl_cv_rpath=done
+ ])
+ wl="$acl_cv_wl"
+ acl_libext="$acl_cv_libext"
+ acl_shlibext="$acl_cv_shlibext"
+ acl_libname_spec="$acl_cv_libname_spec"
+ acl_library_names_spec="$acl_cv_library_names_spec"
+ acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+ 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"
+ dnl Determine whether the user wants rpath handling at all.
+ AC_ARG_ENABLE([rpath],
+ [ --disable-rpath do not hardcode runtime library paths],
+ :, enable_rpath=yes)
+])
+
+dnl AC_LIB_FROMPACKAGE(name, package)
+dnl declares that libname comes from the given package. The configure file
+dnl will then not have a --with-libname-prefix option but a
+dnl --with-package-prefix option. Several libraries can come from the same
+dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
+dnl macro call that searches for libname.
+AC_DEFUN([AC_LIB_FROMPACKAGE],
+[
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ define([acl_frompackage_]NAME, [$2])
+ popdef([NAME])
+ pushdef([PACK],[$2])
+ pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ define([acl_libsinpackage_]PACKUP,
+ m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1])
+ popdef([PACKUP])
+ popdef([PACK])
+])
+
+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
+dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
+dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
+ pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
+ dnl Autoconf >= 2.61 supports dots in --with options.
+ pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ AC_ARG_WITH(P_A_C_K[-prefix],
+[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
+ --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ 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
+])
+ dnl Search the library and its dependencies in $additional_libdir and
+ dnl $LDFLAGS. Using breadth-first-seach.
+ LIB[]NAME=
+ LTLIB[]NAME=
+ INC[]NAME=
+ LIB[]NAME[]_PREFIX=
+ dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
+ dnl computed. So it has to be reset here.
+ HAVE_LIB[]NAME=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='$1 $2'
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
+ dnl or AC_LIB_HAVE_LINKFLAGS call.
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
+ else
+ dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
+ dnl that this library doesn't exist. So just drop it.
+ :
+ fi
+ else
+ dnl Search the library lib$name in $additional_libdir and $LDFLAGS
+ dnl and the already constructed $LIBNAME/$LTLIBNAME.
+ found_dir=
+ found_la=
+ found_so=
+ 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
+ dir="$additional_libdir"
+ dnl The same code as in the loop below:
+ dnl First look for a shared library.
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ 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
+ dnl Then look for a static library.
+ 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
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ dnl First look for a shared library.
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ 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
+ dnl Then look for a static library.
+ 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
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ dnl Found the library.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ dnl Linking with a shared library. We attempt to hardcode its
+ dnl directory into the executable's runpath, unless it's the
+ dnl standard /usr/lib.
+ if test "$enable_rpath" = no \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
+ dnl No hardcoding is needed.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ dnl The hardcoding into $LIBNAME is system dependent.
+ if test "$acl_hardcode_direct" = yes; then
+ dnl Using DIR/libNAME.so during linking hardcodes DIR into the
+ dnl resulting binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ dnl Rely on "-L$found_dir".
+ dnl But don't add it if it's already contained in the LDFLAGS
+ dnl or the already constructed $LIBNAME
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
+ fi
+ if test "$acl_hardcode_minus_L" != no; then
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
+ dnl here, because this doesn't fit in flags passed to the
+ dnl compiler. So give up. No hardcoding. This affects only
+ dnl very old systems.
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ dnl Linking with a static library.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
+ else
+ dnl We shouldn't come here, but anyway it's good to have a
+ dnl fallback.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
+ fi
+ fi
+ dnl Assume the include files are nearby.
+ additional_includedir=
+ case "$found_dir" in
+ */$acl_libdirstem | */$acl_libdirstem/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+ if test "$name" = '$1'; then
+ LIB[]NAME[]_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" = '$1'; then
+ LIB[]NAME[]_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ dnl Potentially add $additional_includedir to $INCNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 3. if it's already present in $CPPFLAGS or the already
+ dnl constructed $INCNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INC[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $INCNAME.
+ INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ dnl Look for dependencies.
+ if test -n "$found_la"; then
+ dnl Read the .la file. It defines the variables
+ dnl dlname, library_names, old_library, dependency_libs, current,
+ dnl age, revision, installed, dlopen, dlpreopen, libdir.
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ dnl We use only dependency_libs.
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 3. if it's already present in $LDFLAGS or the already
+ dnl constructed $LIBNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
+ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
+ haveit=
+ 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
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LIBNAME.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LTLIBNAME.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ dnl Handle this in the next round.
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ dnl Handle this in the next round. Throw away the .la's
+ dnl directory; it is already contained in a preceding -L
+ dnl option.
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ dnl Most likely an immediate library name.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ dnl Didn't find the library; assume it is in the system directories
+ dnl known to the linker and runtime loader. (All the system
+ dnl directories known to the linker should also be known to the
+ dnl runtime loader, otherwise the system is severely misconfigured.)
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$acl_hardcode_libdir_separator"; then
+ dnl Weird platform: only the last -rpath option counts, the user must
+ dnl pass all path elements in one option. We can arrange that for a
+ dnl single library, but not when more than one $LIBNAMEs are used.
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+ done
+ dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ else
+ dnl The -rpath options are cumulative.
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ dnl When using libtool, the option that works for both libraries and
+ dnl executables is -R. The -R options are cumulative.
+ for found_dir in $ltrpathdirs; do
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
+ done
+ fi
+ popdef([P_A_C_K])
+ popdef([PACKLIBS])
+ popdef([PACKUP])
+ popdef([PACK])
+ popdef([NAME])
+])
+
+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
+dnl unless already present in VAR.
+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
+dnl contains two or three consecutive elements that belong together.
+AC_DEFUN([AC_LIB_APPENDTOVAR],
+[
+ for element in [$2]; do
+ haveit=
+ for x in $[$1]; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ [$1]="${[$1]}${[$1]:+ }$element"
+ fi
+ done
+])
+
+dnl For those cases where a variable contains several -L and -l options
+dnl referring to unknown libraries and directories, this macro determines the
+dnl necessary additional linker options for the runtime path.
+dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
+dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
+dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
+dnl otherwise linking without libtool is assumed.
+AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
+[
+ AC_REQUIRE([AC_LIB_RPATH])
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ $1=
+ if test "$enable_rpath" != no; then
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+ dnl Use an explicit option to hardcode directories into the resulting
+ dnl binary.
+ rpathdirs=
+ next=
+ for opt in $2; do
+ if test -n "$next"; then
+ dir="$next"
+ dnl No need to hardcode the standard /usr/lib.
+ if test "X$dir" != "X/usr/$acl_libdirstem" \
+ && test "X$dir" != "X/usr/$acl_libdirstem2"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ next=
+ else
+ case $opt in
+ -L) next=yes ;;
+ -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
+ dnl No need to hardcode the standard /usr/lib.
+ if test "X$dir" != "X/usr/$acl_libdirstem" \
+ && test "X$dir" != "X/usr/$acl_libdirstem2"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ next= ;;
+ *) next= ;;
+ esac
+ fi
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n ""$3""; then
+ dnl libtool is used for linking. Use -R options.
+ for dir in $rpathdirs; do
+ $1="${$1}${$1:+ }-R$dir"
+ done
+ else
+ dnl The linker is used for linking directly.
+ if test -n "$acl_hardcode_libdir_separator"; then
+ dnl Weird platform: only the last -rpath option counts, the user
+ dnl must pass all path elements in one option.
+ alldirs=
+ for dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ $1="$flag"
+ else
+ dnl The -rpath options are cumulative.
+ for dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$dir"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ $1="${$1}${$1:+ }$flag"
+ done
+ fi
+ fi
+ fi
+ fi
+ fi
+ AC_SUBST([$1])
+])
--- /dev/null
+# lib-prefix.m4 serial 7 (gettext-0.18)
+dnl Copyright (C) 2001-2005, 2008-2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
+dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
+dnl require excessive bracketing.
+ifdef([AC_HELP_STRING],
+[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
+[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
+
+dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
+dnl to access previously installed libraries. The basic assumption is that
+dnl a user will want packages to use other packages he previously installed
+dnl with the same --prefix option.
+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
+dnl libraries, but is otherwise very convenient.
+AC_DEFUN([AC_LIB_PREFIX],
+[
+ AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ AC_LIB_ARG_WITH([lib-prefix],
+[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
+ --without-lib-prefix don't search for libraries in includedir and libdir],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/$acl_libdirstem"
+ fi
+ fi
+])
+ if test $use_additional = yes; then
+ dnl Potentially add $additional_includedir to $CPPFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's already present in $CPPFLAGS,
+ dnl 3. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ for x in $CPPFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $CPPFLAGS.
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ dnl Potentially add $additional_libdir to $LDFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's already present in $LDFLAGS,
+ dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+ haveit=
+ for x in $LDFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LDFLAGS.
+ LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ fi
+])
+
+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
+dnl acl_final_exec_prefix, containing the values to which $prefix and
+dnl $exec_prefix will expand at the end of the configure script.
+AC_DEFUN([AC_LIB_PREPARE_PREFIX],
+[
+ dnl Unfortunately, prefix and exec_prefix get only finally determined
+ dnl at the end of configure.
+ if test "X$prefix" = "XNONE"; then
+ acl_final_prefix="$ac_default_prefix"
+ else
+ acl_final_prefix="$prefix"
+ fi
+ if test "X$exec_prefix" = "XNONE"; then
+ acl_final_exec_prefix='${prefix}'
+ else
+ acl_final_exec_prefix="$exec_prefix"
+ fi
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+ prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
+dnl variables prefix and exec_prefix bound to the values they will have
+dnl at the end of the configure script.
+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
+[
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ $1
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_PREPARE_MULTILIB creates
+dnl - a variable acl_libdirstem, containing the basename of the libdir, either
+dnl "lib" or "lib64" or "lib/64",
+dnl - a variable acl_libdirstem2, as a secondary possible value for
+dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
+dnl "lib/amd64".
+AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
+[
+ dnl There is no formal standard regarding lib and lib64.
+ dnl On glibc systems, the current practice is that on a system supporting
+ dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
+ dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
+ dnl the compiler's default mode by looking at the compiler's library search
+ dnl path. If at least one of its elements ends in /lib64 or points to a
+ dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
+ dnl Otherwise we use the default, namely "lib".
+ dnl On Solaris systems, the current practice is that on a system supporting
+ dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
+ dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
+ dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ acl_libdirstem=lib
+ acl_libdirstem2=
+ case "$host_os" in
+ solaris*)
+ dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
+ dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
+ dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
+ dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
+ dnl symlink is missing, so we set acl_libdirstem2 too.
+ AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
+ [AC_EGREP_CPP([sixtyfour bits], [
+#ifdef _LP64
+sixtyfour bits
+#endif
+ ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
+ ])
+ 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"
+])
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
-scriptversion=2012-01-06.13; # UTC
+scriptversion=2009-04-28.21; # UTC
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
-# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+# 2008, 2009 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
+ tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
# Not GNU programs, they don't have --version.
;;
+ tar*)
+ if test -n "$run"; then
+ echo 1>&2 "ERROR: \`tar' requires --run"
+ exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ exit 1
+ fi
+ ;;
+
*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if test $# -ne 1; then
- eval LASTARG=\${$#}
+ eval LASTARG="\${$#}"
case $LASTARG in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if test $# -ne 1; then
- eval LASTARG=\${$#}
+ eval LASTARG="\${$#}"
case $LASTARG in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
touch $file
;;
+ tar*)
+ shift
+
+ # We have already tried tar in the generic part.
+ # Look for gnutar/gtar before invocation to avoid ugly error
+ # messages.
+ if (gnutar --version > /dev/null 2>&1); then
+ gnutar "$@" && exit 0
+ fi
+ if (gtar --version > /dev/null 2>&1); then
+ gtar "$@" && exit 0
+ fi
+ firstarg="$1"
+ if shift; then
+ case $firstarg in
+ *o*)
+ firstarg=`echo "$firstarg" | sed s/o//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ case $firstarg in
+ *h*)
+ firstarg=`echo "$firstarg" | sed s/h//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ fi
+
+ echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+ You may want to install GNU tar or Free paxutils, or check the
+ command line arguments."
+ exit 1
+ ;;
+
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and is $msg.
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.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/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.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) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
+MOC4 = @MOC4@
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
MOZILLA_LIBS = @MOZILLA_LIBS@
NM = @NM@
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.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/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.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) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
+MOC4 = @MOC4@
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
MOZILLA_LIBS = @MOZILLA_LIBS@
NM = @NM@
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.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/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.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) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
+MOC4 = @MOC4@
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
MOZILLA_LIBS = @MOZILLA_LIBS@
NM = @NM@
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.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/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.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) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
+MOC4 = @MOC4@
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
MOZILLA_LIBS = @MOZILLA_LIBS@
NM = @NM@
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.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/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.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) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
+MOC4 = @MOC4@
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
MOZILLA_LIBS = @MOZILLA_LIBS@
NM = @NM@
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.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/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.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) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
+MOC4 = @MOC4@
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
MOZILLA_LIBS = @MOZILLA_LIBS@
NM = @NM@
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.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/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.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) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
+MOC4 = @MOC4@
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
MOZILLA_LIBS = @MOZILLA_LIBS@
NM = @NM@
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.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/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.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) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
+MOC4 = @MOC4@
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
MOZILLA_LIBS = @MOZILLA_LIBS@
NM = @NM@
java_awt_font_HANGING_BASELINE = 2
};
-static PangoFT2FontMap *ft2_map = NULL;
+static PangoFontMap *font_map = NULL;
JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GdkFontPeer_initStaticState
(JNIEnv *env, jclass clazz __attribute__((unused)))
{
gtkpeer_init_font_IDs(env);
- ft2_map = PANGO_FT2_FONT_MAP(pango_ft2_font_map_new());
+ font_map = pango_ft2_font_map_new();
}
JNIEXPORT void JNICALL
pango_font_description_set_size (pfont->desc, size * PANGO_SCALE);
/* Create new context */
- pfont->ctx = pango_ft2_font_map_create_context (ft2_map);
+ pfont->ctx = pango_font_map_create_context (font_map);
g_assert (pfont->ctx != NULL);
pango_context_set_font_description (pfont->ctx, pfont->desc);
JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GtkImage_freePixbuf(JNIEnv *env, jobject obj)
{
- gdk_pixbuf_unref (cp_gtk_image_get_pixbuf (env, obj));
+ g_object_unref (cp_gtk_image_get_pixbuf (env, obj));
}
/**
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.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/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.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) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
+MOC4 = @MOC4@
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
MOZILLA_LIBS = @MOZILLA_LIBS@
NM = @NM@
/*************************************************************************/
+#ifndef IUCLC
+#define IUCLC 0
+#endif
+
#define TERMIOS_ECHO_IFLAGS (IUCLC|IXON|IXOFF|IXANY)
#define TERMIOS_ECHO_LFLAGS (ECHO|ECHOE|ECHOK|ECHONL|TOSTOP)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.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/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.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) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
+MOC4 = @MOC4@
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
MOZILLA_LIBS = @MOZILLA_LIBS@
NM = @NM@
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.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/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.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) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
+MOC4 = @MOC4@
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
MOZILLA_LIBS = @MOZILLA_LIBS@
NM = @NM@
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.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/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.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) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
+MOC4 = @MOC4@
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
MOZILLA_LIBS = @MOZILLA_LIBS@
NM = @NM@
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.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/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.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) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
+MOC4 = @MOC4@
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
MOZILLA_LIBS = @MOZILLA_LIBS@
NM = @NM@
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.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/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.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) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
+MOC4 = @MOC4@
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
MOZILLA_LIBS = @MOZILLA_LIBS@
NM = @NM@
#include <stdlib.h>
#include <jni.h>
+#include <jcl.h>
#include "java_util_VMTimeZone.h"
tz1_len = strlen (tz1);
tz2_len = strlen (tz2);
tzoff_len = jint_to_charbuf (tzoff + 11, tzoffset);
- tzid = (char *) malloc (tz1_len + tz2_len + tzoff_len + 1); /* FIXME alloc */
+ tzid = (char *) malloc (tz1_len + tz2_len + tzoff_len + 1);
+ if (tzid == NULL) {
+ JCL_ThrowException (env, "java/lang/OutOfMemoryError",
+ "malloc() failed");
+ return 0;
+ }
+
memcpy (tzid, tz1, tz1_len);
memcpy (tzid + tz1_len, tzoff + 11 - tzoff_len, tzoff_len);
memcpy (tzid + tz1_len + tzoff_len, tz2, tz2_len);
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.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/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.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) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
+MOC4 = @MOC4@
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
MOZILLA_LIBS = @MOZILLA_LIBS@
NM = @NM@
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.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/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.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) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
+MOC4 = @MOC4@
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
MOZILLA_LIBS = @MOZILLA_LIBS@
NM = @NM@
Java_gnu_javax_sound_midi_dssi_DSSISynthesizer_open_1
(JNIEnv *env, jclass clazz __attribute__((unused)), jlong handle)
{
- unsigned int port_count, j, cindex;
+ unsigned int port_count, j, cindex, ret;
const char **ports;
int controller = 0;
dssi_data *data = (dssi_data *) (long) handle;
- if ((data->jack_client = jack_client_new (data->desc->LADSPA_Plugin->Label)) == 0)
+ jack_status_t status;
+ char buffer[31];
+
+ if ((data->jack_client = jack_client_open (data->desc->LADSPA_Plugin->Label,
+ JackUseExactName, &status)) == 0)
{
- /* JCL_ThrowException (env, "javax/sound/midi/MidiUnavailableException", */
- JCL_ThrowException (env, "java/io/IOException",
- "can't create jack client");
+ ret = snprintf(buffer, 31, "can't create jack client: %4d", status);
+ assert (ret == 30);
+ JCL_ThrowException (env, "javax/sound/midi/MidiUnavailableException",
+ buffer);
return;
}
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.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/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.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) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
+MOC4 = @MOC4@
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
MOZILLA_LIBS = @MOZILLA_LIBS@
NM = @NM@
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.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/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.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) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
+MOC4 = @MOC4@
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
MOZILLA_LIBS = @MOZILLA_LIBS@
NM = @NM@
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.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/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.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) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
+MOC4 = @MOC4@
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
MOZILLA_LIBS = @MOZILLA_LIBS@
NM = @NM@
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.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/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.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) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
+MOC4 = @MOC4@
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
MOZILLA_LIBS = @MOZILLA_LIBS@
NM = @NM@
*
* @throws NO_IMPLEMENT always. If used, the method must be overridden.
*/
- @SuppressWarnings("unchecked") // Needed for API compatibility
+ @SuppressWarnings("rawtypes") // Needed for API compatibility
public ServantObject _servant_preinvoke(String operation, Class expectedType)
{
throw new NO_IMPLEMENT(INAPPROPRIATE);
* @return the servant or null if the servant is not an expected type
* of the method is not supported, for example, due security reasons.
*/
- @SuppressWarnings("unchecked") // Needed for API compatibility
+ @SuppressWarnings("rawtypes") // Needed for API compatibility
public ServantObject servant_preinvoke(org.omg.CORBA.Object self,
String operation, Class expectedType
)
* @param klass a CORBA class
* @throws NO_IMPLEMENT, always.
*/
- @SuppressWarnings("unchecked") // Needed for API compatibility
+ @SuppressWarnings("rawtypes") // Needed for API compatibility
public Object read_Object(Class klass)
{
throw new NO_IMPLEMENT();
* @return the servant or null if the servant is not an expected type
* of the method is not supported, for example, due security reasons.
*/
- @SuppressWarnings("unchecked") // Needed for API compatibility
+ @SuppressWarnings("rawtypes") // Needed for API compatibility
public ServantObject _servant_preinvoke(String method, Class expected_type)
{
return delegate.servant_preinvoke(this, method, expected_type);
*
* @return an abstract interface, unmarshaled from the stream
*/
- @SuppressWarnings("unchecked") // Needed for API compatibility
+ @SuppressWarnings("rawtypes") // Needed for API compatibility
public Object read_abstract_interface(Class clz)
{
boolean isValue = read_boolean();
*
* @return an value type structure, unmarshaled from the stream
*/
- @SuppressWarnings("unchecked") // Needed for API compatibility
+ @SuppressWarnings("rawtypes") // Needed for API compatibility
public Serializable read_value(Class clz)
{
return Vio.read(this, clz);
*
* @param value a value type object to write.
*/
- @SuppressWarnings("unchecked") // Needed for API compatibility
+ @SuppressWarnings("rawtypes") // Needed for API compatibility
public void write_value(Serializable value, Class clz)
{
Vio.write(this, value, clz);
/**
* The purpose and value of this field are not documented.
*/
- @SuppressWarnings("unchecked") // Needed for API compatibility
+ @SuppressWarnings("rawtypes") // Needed for API compatibility
public static final Class _opsClass = DynAnyFactoryOperations.class;
/**
/**
* The purpose and value of this field are not documented.
*/
- @SuppressWarnings("unchecked") // Needed for API compatibility
+ @SuppressWarnings("rawtypes") // Needed for API compatibility
public static final Class _opsClass = DynAnyOperations.class;
/**
/**
* The purpose and value of this field are not documented.
*/
- @SuppressWarnings("unchecked") // Needed for API compatibility
+ @SuppressWarnings("rawtypes") // Needed for API compatibility
public static final Class _opsClass = DynArrayOperations.class;
/**
/**
* The purpose and value of this field are not documented.
*/
- @SuppressWarnings("unchecked") // Needed for API compatibility
+ @SuppressWarnings("rawtypes") // Needed for API compatibility
public static final Class _opsClass = DynEnumOperations.class;
/**
/**
* The purpose and value of this field are not documented.
*/
- @SuppressWarnings("unchecked") // Needed for API compatibility
+ @SuppressWarnings("rawtypes") // Needed for API compatibility
public static final Class _opsClass = DynFixedOperations.class;
/**
/**
* The purpose and value of this field are not documented.
*/
- @SuppressWarnings("unchecked") // Needed for API compatibility
+ @SuppressWarnings("rawtypes") // Needed for API compatibility
public static final Class _opsClass = DynSequenceOperations.class;
/**
/**
* The purpose and value of this field are not documented.
*/
- @SuppressWarnings("unchecked") // Needed for API compatibility
+ @SuppressWarnings("rawtypes") // Needed for API compatibility
public static final Class _opsClass = DynStructOperations.class;
/**
/**
* The purpose and value of this field are not documented.
*/
- @SuppressWarnings("unchecked") // Needed for API compatibility
+ @SuppressWarnings("rawtypes") // Needed for API compatibility
public static final Class _opsClass = DynUnionOperations.class;
/**
/**
* The purpose and value of this field are not documented.
*/
- @SuppressWarnings("unchecked") // Needed for API compatibility
+ @SuppressWarnings("rawtypes") // Needed for API compatibility
public static final Class _opsClass = DynValueOperations.class;
/**
* This the purpose of this field is undocumented up till 1.5 java API
* inclusive.
*/
- @SuppressWarnings("unchecked") // Needed for API compatibility
+ @SuppressWarnings("rawtypes") // Needed for API compatibility
public static final Class _opsClass = ServantActivatorOperations.class;
/**
* This the purpose of this field is undocumented up till 1.5 java API
* inclusive.
*/
- @SuppressWarnings("unchecked") // Needed for API compatibility
+ @SuppressWarnings("rawtypes") // Needed for API compatibility
public static final Class _opsClass = ServantLocatorOperations.class;
/**
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.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/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.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) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
+MOC4 = @MOC4@
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
MOZILLA_LIBS = @MOZILLA_LIBS@
NM = @NM@
# Localized error messages for gnu.regexp, in Italian.
-# $Id: MessagesBundle_it.properties,v 1.2 2006/12/10 20:25:50 gnu_andrew Exp $
+# $Id: MessagesBundle_it.properties,v 1.2 2006-12-10 20:25:50 gnu_andrew Exp $
# Messaggi italiani per gnu.regexp.
#
# Attenzione: Questa traduzione fu scritto da un italo-americano.
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.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/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.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) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
+MOC4 = @MOC4@
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
MOZILLA_LIBS = @MOZILLA_LIBS@
NM = @NM@
-# $Id: classpath.spec.in,v 1.3 2006/12/10 20:25:50 gnu_andrew Exp $
+# $Id: classpath.spec.in,v 1.3 2006-12-10 20:25:50 gnu_andrew Exp $
%define version_num @PACKAGE_VERSION@
%define release_num 1
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.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/no-executables.m4 \
$(top_srcdir)/../../config/override.m4 \
$(top_srcdir)/m4/ax_create_stdint_h.m4 \
$(top_srcdir)/m4/ax_func_which_gethostbyname_r.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) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs
MKDIR = @MKDIR@
MKDIR_P = @MKDIR_P@
MOC = @MOC@
+MOC4 = @MOC4@
MOZILLA_CFLAGS = @MOZILLA_CFLAGS@
MOZILLA_LIBS = @MOZILLA_LIBS@
NM = @NM@
/* Doc.java -- Model of an item to document.
- Copyright (C) 1999 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2012 Free Software Foundation, Inc.
This file is part of GNU Classpath.
* This interface is the super-interface of all items that can have
* Javadoc comments associated with them.
*/
-public interface Doc extends java.io.Serializable, Comparable
+public interface Doc extends java.io.Serializable, Comparable<Doc>
{
/**
/* gnu.classpath.tools.doclets.AbstractDoclet
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2012 Free Software Foundation, Inc.
This file is part of GNU Classpath.
* Mapping from tag type to Taglet for user Taglets specified on
* the command line.
*/
- protected Map tagletMap = new LinkedHashMap();
+ protected Map<String,Taglet> tagletMap = new LinkedHashMap<String,Taglet>();
/**
* Stores the package groups specified in the user
* options. Contains objects of type PackageGroup.
*/
- private List packageGroups = new LinkedList();
-
- /**
- * The current classpath for loading taglet classes.
- */
- private String tagletPath;
+ private List<PackageGroup> packageGroups = new LinkedList<PackageGroup>();
/**
* Keeps track of the tags mentioned by the user during option
* processiong so that an error can be emitted if a tag is
* mentioned more than once.
*/
- private List mentionedTags = new LinkedList();
+ private List<Taglet> mentionedTags = new LinkedList<Taglet>();
public static int optionLength(String option) {
return instance.getOptionLength(option);
new DocletOptionFile("-d",
new File(System.getProperty("user.dir")));
- private DocletOptionFlag optionNoEmailWarn =
- new DocletOptionFlag("-noemailwarn");
-
private DocletOptionFlag optionAuthor =
new DocletOptionFlag("-author");
private DocletOptionColonSeparated optionExcludeDocFilesSubDir =
new DocletOptionColonSeparated("-excludedocfilessubdir");
- private DocletOptionTagletPath optionTagletPath =
- new DocletOptionTagletPath("-tagletpath");
-
private DocletOptionTag optionTaglet =
new DocletOptionTag("-taglet");
private DocletOptionTag optionTag =
new DocletOptionTag("-tag");
- private class DocletOptionTaglet
- extends DocletOption
- {
- DocletOptionTaglet(String optionName)
- {
- super(optionName);
- }
-
- public int getLength()
- {
- return 2;
- }
-
- public boolean set(String[] optionArr)
- {
-
- boolean tagletLoaded = false;
-
- String useTagletPath = AbstractDoclet.this.tagletPath;
- if (null == useTagletPath) {
- useTagletPath = System.getProperty("java.class.path");
- }
-
- try {
- Class tagletClass;
- try {
- tagletClass
- = new FileSystemClassLoader(useTagletPath).loadClass(optionArr[1]);
- }
- catch (ClassNotFoundException e) {
- // If not found on specified tagletpath, try default classloader
- tagletClass
- = Class.forName(optionArr[1]);
- }
- Method registerTagletMethod
- = tagletClass.getDeclaredMethod("register", new Class[] { java.util.Map.class });
-
- if (!registerTagletMethod.getReturnType().equals(Void.TYPE)) {
- printError("Taglet class '" + optionArr[1] + "' found, but register method doesn't return void.");
- }
- else if (registerTagletMethod.getExceptionTypes().length > 0) {
- printError("Taglet class '" + optionArr[1] + "' found, but register method contains throws clause.");
- }
- else if ((registerTagletMethod.getModifiers() & (Modifier.STATIC | Modifier.PUBLIC | Modifier.ABSTRACT)) != (Modifier.STATIC | Modifier.PUBLIC)) {
- printError("Taglet class '" + optionArr[1] + "' found, but register method isn't public static, or is abstract..");
- }
- else {
- Map tempMap = new HashMap();
- registerTagletMethod.invoke(null, new Object[] { tempMap });
- tagletLoaded = true;
- String name = (String)tempMap.keySet().iterator().next();
- Taglet taglet = (Taglet)tempMap.get(name);
- tagletMap.put(name, taglet);
- mentionedTags.add(taglet);
- }
- }
- catch (NoSuchMethodException e) {
- printError("Taglet class '" + optionArr[1] + "' found, but doesn't contain the register method.");
- }
- catch (SecurityException e) {
- printError("Taglet class '" + optionArr[1] + "' cannot be loaded: " + e.getMessage());
- }
- catch (InvocationTargetException e) {
- printError("Taglet class '" + optionArr[1] + "' found, but register method throws exception: " + e.toString());
- }
- catch (IllegalAccessException e) {
- printError("Taglet class '" + optionArr[1] + "' found, but there was a problem when accessing the register method: " + e.toString());
- }
- catch (IllegalArgumentException e) {
- printError("Taglet class '" + optionArr[1] + "' found, but there was a problem when accessing the register method: " + e.toString());
- }
- catch (ClassNotFoundException e) {
- printError("Taglet class '" + optionArr[1] + "' cannot be found.");
- }
- return tagletLoaded;
- }
- }
-
private class DocletOptionGroup
extends DocletOption
{
packageMatcher.addWildcard(packageWildcard);
}
- SortedSet groupPackages = packageMatcher.filter(rootDoc.specifiedPackages());
+ SortedSet<PackageDoc> groupPackages = packageMatcher.filter(rootDoc.specifiedPackages());
packageGroups.add(new PackageGroup(optionArr[1], groupPackages));
}
}
-
- private class DocletOptionTagletPath
- extends DocletOption
- {
- DocletOptionTagletPath(String optionName)
- {
- super(optionName);
- }
-
- public int getLength()
- {
- return 2;
- }
-
- public boolean set(String[] optionArr)
- {
- AbstractDoclet.this.tagletPath = optionArr[1];
- return true;
- }
- }
-
private class DocletOptionTag
extends DocletOption
{
optionGroup,
optionDocFilesSubDirs,
optionExcludeDocFilesSubDir,
- optionTagletPath,
optionTaglet,
optionTag,
};
nameToOptionMap.put(option.getName(), option);
}
- private Map nameToOptionMap = new HashMap();
+ private Map<String,DocletOption> nameToOptionMap = new HashMap<String,DocletOption>();
private int getOptionLength(String optionName)
{
registerOptions();
- DocletOption option = (DocletOption)nameToOptionMap.get(optionName.toLowerCase());
+ DocletOption option = nameToOptionMap.get(optionName.toLowerCase());
if (null != option) {
return option.getLength();
}
}
}
- protected List getKnownDirectSubclasses(ClassDoc classDoc)
+ protected List<ClassDoc> getKnownDirectSubclasses(ClassDoc classDoc)
{
- List result = new LinkedList();
+ List<ClassDoc> result = new LinkedList<ClassDoc>();
if (!"java.lang.Object".equals(classDoc.qualifiedName())) {
ClassDoc[] classes = rootDoc.classes();
for (int i=0; i<classes.length; ++i) {
}
protected static class IndexKey
- implements Comparable
+ implements Comparable<IndexKey>
{
private String name;
private String lowerName;
return lowerName.hashCode();
}
- public int compareTo(Object other)
+ public int compareTo(IndexKey ik)
{
- return lowerName.compareTo(((IndexKey)other).lowerName);
+ return lowerName.compareTo(ik.lowerName);
}
public String getName()
}
}
- private Map categorizedIndex;
+ private Map<Character,List<Doc>> categorizedIndex;
- protected Map getCategorizedIndex()
+ protected Map<Character,List<Doc>> getCategorizedIndex()
{
if (null == categorizedIndex) {
- categorizedIndex = new LinkedHashMap();
+ categorizedIndex = new LinkedHashMap<Character,List<Doc>>();
- Map indexMap = getIndexByName();
- LinkedList keys = new LinkedList(); //indexMap.keySet().size());
+ Map<IndexKey,Doc> indexMap = getIndexByName();
+ LinkedList<IndexKey> keys = new LinkedList<IndexKey>(); //indexMap.keySet().size());
keys.addAll(indexMap.keySet());
Collections.sort(keys);
- Iterator it = keys.iterator(); //indexMap.keySet().iterator();
+ Iterator<IndexKey> it = keys.iterator(); //indexMap.keySet().iterator();
char previousCategoryLetter = '\0';
Character keyLetter = null;
while (it.hasNext()) {
- IndexKey key = (IndexKey)it.next();
+ IndexKey key = it.next();
char firstChar = Character.toUpperCase(key.getName().charAt(0));
if (firstChar != previousCategoryLetter) {
keyLetter = new Character(firstChar);
previousCategoryLetter = firstChar;
- categorizedIndex.put(keyLetter, new LinkedList());
+ categorizedIndex.put(keyLetter, new LinkedList<Doc>());
}
- List letterList = (List)categorizedIndex.get(keyLetter);
+ List<Doc> letterList = categorizedIndex.get(keyLetter);
letterList.add(indexMap.get(key));
}
}
}
- private Map indexByName;
+ private Map<IndexKey,Doc> indexByName;
- protected Map getIndexByName()
+ protected Map<IndexKey,Doc> getIndexByName()
{
if (null == indexByName) {
// Create index
// Collect index
- indexByName = new HashMap(); //TreeMap();
+ indexByName = new HashMap<IndexKey,Doc>(); //TreeMap();
// Add packages to index
protected void printTaglets(Tag[] tags, TagletContext context, TagletPrinter output, boolean inline)
{
- for (Iterator it = tagletMap.keySet().iterator(); it.hasNext(); ) {
- String tagName = (String)it.next();
- Object o = tagletMap.get(tagName);
- Taglet taglet = (Taglet)o;
+ for (Iterator<String> it = tagletMap.keySet().iterator(); it.hasNext(); ) {
+ String tagName = it.next();
+ Taglet taglet = tagletMap.get(tagName);
Doc doc = context.getDoc();
if (inline == taglet.isInlineTag()
&& ((doc == null
|| (doc instanceof PackageDoc && taglet.inPackage())
|| ((doc.isClass() || doc.isInterface()) && taglet.inType()))))) {
- List tagsOfThisType = new LinkedList();
+ List<Tag> tagsOfThisType = new LinkedList<Tag>();
for (int i=0; i<tags.length; ++i) {
if (tags[i].name().substring(1).equals(tagName)) {
tagsOfThisType.add(tags[i]);
}
}
- Tag[] tagletTags = (Tag[])tagsOfThisType.toArray(new Tag[tagsOfThisType.size()]);
+ Tag[] tagletTags = tagsOfThisType.toArray(new Tag[tagsOfThisType.size()]);
String tagletString;
if (taglet instanceof StandardTaglet) {
/**
* @param usedClassToPackagesMap ClassDoc to (PackageDoc to (UsageType to (Set of Doc)))
*/
- private void addUsedBy(Map usedClassToPackagesMap,
+ private void addUsedBy(Map<ClassDoc,Map<PackageDoc,Map<UsageType,Set<Doc>>>> usedClassToPackagesMap,
ClassDoc usedClass, UsageType usageType, Doc user, PackageDoc userPackage)
{
- Map packageToUsageTypeMap = (Map)usedClassToPackagesMap.get(usedClass);
+ Map<PackageDoc,Map<UsageType,Set<Doc>>> packageToUsageTypeMap = usedClassToPackagesMap.get(usedClass);
if (null == packageToUsageTypeMap) {
- packageToUsageTypeMap = new HashMap();
+ packageToUsageTypeMap = new HashMap<PackageDoc,Map<UsageType,Set<Doc>>>();
usedClassToPackagesMap.put(usedClass, packageToUsageTypeMap);
}
- Map usageTypeToUsersMap = (Map)packageToUsageTypeMap.get(userPackage);
+ Map<UsageType,Set<Doc>> usageTypeToUsersMap = packageToUsageTypeMap.get(userPackage);
if (null == usageTypeToUsersMap) {
- usageTypeToUsersMap = new TreeMap();
+ usageTypeToUsersMap = new TreeMap<UsageType,Set<Doc>>();
packageToUsageTypeMap.put(userPackage, usageTypeToUsersMap);
}
- Set userSet = (Set)usageTypeToUsersMap.get(usageType);
+ Set<Doc> userSet = usageTypeToUsersMap.get(usageType);
if (null == userSet) {
- userSet = new TreeSet(); // FIXME: we need the collator from Main here
+ userSet = new TreeSet<Doc>(); // FIXME: we need the collator from Main here
usageTypeToUsersMap.put(usageType, userSet);
}
userSet.add(user);
*/
private Map collectUsage() {
- Map _usedClassToPackagesMap = new HashMap();
+ Map<ClassDoc,Map<PackageDoc,Map<UsageType,Set<Doc>>>> _usedClassToPackagesMap =
+ new HashMap<ClassDoc,Map<PackageDoc,Map<UsageType,Set<Doc>>>>();
ClassDoc[] classes = rootDoc.classes();
for (int i = 0, ilim = classes.length; i < ilim; ++ i) {
// classes implementing
InterfaceRelation relation
= (InterfaceRelation)getInterfaceRelations().get(clazz);
- Iterator it = relation.implementingClasses.iterator();
+ Iterator<ClassDoc> it = relation.implementingClasses.iterator();
while (it.hasNext()) {
- ClassDoc implementor = (ClassDoc)it.next();
+ ClassDoc implementor = it.next();
addUsedBy(_usedClassToPackagesMap,
clazz, UsageType.CLASS_IMPLEMENTING, implementor, implementor.containingPackage());
}
return _usedClassToPackagesMap;
}
- private Map usedClassToPackagesMap = null;
+ private Map<ClassDoc,Map<PackageDoc,Map<UsageType,Set<Doc>>>> usedClassToPackagesMap = null;
- protected Map getUsageOfClass(ClassDoc classDoc)
+ protected Map<PackageDoc,Map<UsageType,Set<Doc>>> getUsageOfClass(ClassDoc classDoc)
{
if (null == this.usedClassToPackagesMap) {
this.usedClassToPackagesMap = collectUsage();
}
- return (Map)this.usedClassToPackagesMap.get(classDoc);
+ return this.usedClassToPackagesMap.get(classDoc);
}
protected static class UsageType
- implements Comparable
+ implements Comparable<UsageType>
{
public static final UsageType CLASS_DERIVED_FROM = new UsageType("class-derived-from");
public static final UsageType CLASS_IMPLEMENTING = new UsageType("class-implementing");
this.id = id;
}
- public int compareTo(Object other)
+ public int compareTo(UsageType ut)
{
- return this.id.compareTo(((UsageType)other).id);
+ return this.id.compareTo(ut.id);
}
public String toString() {
return MessageFormat.format(getString(key), new Object[] { value1 });
}
- protected List getPackageGroups()
+ protected List<PackageGroup> getPackageGroups()
{
return packageGroups;
}
/* gnu.classpath.tools.doclets.PackageMatcher
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2012 Free Software Foundation, Inc.
This file is part of GNU Classpath.
*/
public class PackageMatcher
{
- private Set patterns = new HashSet();
+ private Set<Pattern> patterns = new HashSet<Pattern>();
/**
* Add a wildcard to be matched. Wildcards can contain asterisk
* array given will be put into the output list if it matches one
* or more of the wildcards added to this PackageMatcher before.
*/
- public SortedSet filter(PackageDoc[] packageDocs)
+ public SortedSet<PackageDoc> filter(PackageDoc[] packageDocs)
{
- SortedSet result = new TreeSet();
+ SortedSet<PackageDoc> result = new TreeSet<PackageDoc>();
for (int i=0; i<packageDocs.length; ++i) {
if (match(packageDocs[i])) {
result.add(packageDocs[i]);
*/
public boolean match(PackageDoc packageDoc)
{
- Iterator it = patterns.iterator();
+ Iterator<Pattern> it = patterns.iterator();
while (it.hasNext()) {
- Pattern pattern = (Pattern)it.next();
+ Pattern pattern = it.next();
Matcher matcher = pattern.matcher(packageDoc.name());
if (matcher.matches()) {
return true;
/* gnu.classpath.tools.doclets.htmldoclet.HtmlDoclet
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2012 Free Software Foundation, Inc.
This file is part of GNU Classpath.
/**
* Contains ExternalDocSet.
*/
- private List externalDocSets = new LinkedList();
+ private List<ExternalDocSet> externalDocSets = new LinkedList<ExternalDocSet>();
/**
* Contains String->ExternalDocSet.
*/
- private Map packageNameToDocSet = new HashMap();
+ private Map<String,ExternalDocSet> packageNameToDocSet = new HashMap<String, ExternalDocSet>();
/**
* Cache for version string from resource /version.properties
HtmlPage output = newHtmlPage(new File(packageDir, "package-summary" + filenameExtension),
pathToRoot);
- Set keywords = new LinkedHashSet();
+ Set<String> keywords = new LinkedHashSet<String>();
keywords.add(packageDoc.name() + " packages");
output.beginPage(getPageTitle(packageDoc.name()), getOutputCharset(),
}
static class TreeNode
- implements Comparable
+ implements Comparable<TreeNode>
{
ClassDoc classDoc;
- SortedSet children = new TreeSet();
+ SortedSet<TreeNode> children = new TreeSet<TreeNode>();
TreeNode(ClassDoc classDoc) {
TreeNode.this.classDoc = classDoc;
return classDoc.equals(((TreeNode)other).classDoc);
}
- public int compareTo(Object other)
+ public int compareTo(TreeNode other)
{
- return classDoc.compareTo(((TreeNode)other).classDoc);
+ return classDoc.compareTo(other.classDoc);
}
public int hashCode()
}
}
- private TreeNode addClassTreeNode(Map treeMap, ClassDoc classDoc)
+ private TreeNode addClassTreeNode(Map<String,TreeNode> treeMap, ClassDoc classDoc)
{
- TreeNode node = (TreeNode)treeMap.get(classDoc.qualifiedName());
+ TreeNode node = treeMap.get(classDoc.qualifiedName());
if (null == node) {
node = new TreeNode(classDoc);
treeMap.put(classDoc.qualifiedName(), node);
return node;
}
- private TreeNode addInterfaceTreeNode(Map treeMap, ClassDoc classDoc)
+ private TreeNode addInterfaceTreeNode(Map<String,TreeNode> treeMap, ClassDoc classDoc)
{
- TreeNode node = (TreeNode)treeMap.get(classDoc.qualifiedName());
+ TreeNode node = treeMap.get(classDoc.qualifiedName());
if (null == node) {
node = new TreeNode(classDoc);
treeMap.put(classDoc.qualifiedName(), node);
}
}
else {
- TreeNode rootNode = (TreeNode)treeMap.get("<root>");
+ TreeNode rootNode = treeMap.get("<root>");
if (null == rootNode) {
rootNode = new TreeNode(null);
treeMap.put("<root>", rootNode);
if (!node.children.isEmpty()) {
output.beginElement("li", "class", "level");
output.beginElement("ul");
- Iterator it = node.children.iterator();
+ Iterator<TreeNode> it = node.children.iterator();
while (it.hasNext()) {
- TreeNode child = (TreeNode)it.next();
- printPackageTreeRec(output, child, node);
+ printPackageTreeRec(output, it.next(), node);
}
output.endElement("ul");
output.endElement("li");
private void printClassTree(HtmlPage output, ClassDoc[] classDocs)
{
- Map classTreeMap = new HashMap();
+ Map<String,TreeNode> classTreeMap = new HashMap<String,TreeNode>();
for (int i=0; i<classDocs.length; ++i) {
ClassDoc classDoc = classDocs[i];
}
}
- TreeNode root = (TreeNode)classTreeMap.get("java.lang.Object");
+ TreeNode root = classTreeMap.get("java.lang.Object");
if (null != root) {
output.div(CssClass.PACKAGE_TREE_SECTION_TITLE, "Class Hierarchy");
output.beginDiv(CssClass.PACKAGE_TREE);
private void printInterfaceTree(HtmlPage output, ClassDoc[] classDocs)
{
- Map interfaceTreeMap = new HashMap();
+ Map<String,TreeNode> interfaceTreeMap = new HashMap<String,TreeNode>();
for (int i=0; i<classDocs.length; ++i) {
ClassDoc classDoc = classDocs[i];
}
}
- TreeNode interfaceRoot = (TreeNode)interfaceTreeMap.get("<root>");
+ TreeNode interfaceRoot = interfaceTreeMap.get("<root>");
if (null != interfaceRoot) {
- Iterator it = interfaceRoot.children.iterator();
+ Iterator<TreeNode> it = interfaceRoot.children.iterator();
if (it.hasNext()) {
output.div(CssClass.PACKAGE_TREE_SECTION_TITLE, "Interface Hierarchy");
output.beginDiv(CssClass.PACKAGE_TREE);
while (it.hasNext()) {
- TreeNode node = (TreeNode)it.next();
+ TreeNode node = it.next();
printPackageTreeRec(output, node, null);
}
output.endDiv(CssClass.PACKAGE_TREE);
output.beginDiv(CssClass.FULL_TREE_PACKAGELIST);
output.div(CssClass.FULL_TREE_PACKAGELIST_HEADER, "Package Hierarchies:");
output.beginDiv(CssClass.FULL_TREE_PACKAGELIST_ITEM);
- Set allPackages = getAllPackages();
- Iterator it = allPackages.iterator();
+ Set<PackageDoc> allPackages = getAllPackages();
+ Iterator<PackageDoc> it = allPackages.iterator();
while (it.hasNext()) {
- PackageDoc packageDoc = (PackageDoc)it.next();
+ PackageDoc packageDoc = it.next();
output.beginAnchor(getPackageURL(packageDoc) + "tree" + filenameExtension);
output.print(packageDoc.name());
output.endAnchor();
{
output.beginDiv(CssClass.INDEX_ENTRY);
output.beginDiv(CssClass.INDEX_ENTRY_KEY);
- String anchor = null;
- String description = null;
if (entry instanceof PackageDoc) {
output.beginAnchor(getPackageURL((PackageDoc)entry) + "package-summary" + filenameExtension);
output.print(entry.name());
output.beginDiv(CssClass.PACKAGE_MENU_LIST);
- Set packageDocs = getAllPackages();
- Iterator it = packageDocs.iterator();
+ Set<PackageDoc> packageDocs = getAllPackages();
+ Iterator<PackageDoc> it = packageDocs.iterator();
while (it.hasNext()) {
- PackageDoc packageDoc = (PackageDoc)it.next();
+ PackageDoc packageDoc = it.next();
output.beginSpan(CssClass.PACKAGE_MENU_ENTRY);
output.beginAnchor(getPackageURL(packageDoc) + "classes" + filenameExtension,
null,
{
if (!classDocs.isEmpty()) {
output.div(CssClass.CLASS_MENU_SUBTITLE, header);
- Iterator it = classDocs.iterator();
+ Iterator<ClassDoc> it = classDocs.iterator();
while (it.hasNext()) {
- ClassDoc classDoc = (ClassDoc)it.next();
+ ClassDoc classDoc = it.next();
printClassMenuEntry(output, classDoc);
}
}
output.beginDiv(CssClass.CLASS_MENU_LIST);
if (categorized) {
- Set classes = new TreeSet();
- Set interfaces = new TreeSet();
- Set exceptions = new TreeSet();
- Set errors = new TreeSet();
+ Set<ClassDoc> classes = new TreeSet<ClassDoc>();
+ Set<ClassDoc> interfaces = new TreeSet<ClassDoc>();
+ Set<ClassDoc> exceptions = new TreeSet<ClassDoc>();
+ Set<ClassDoc> errors = new TreeSet<ClassDoc>();
for (int i=0; i<classDocs.length; ++i) {
ClassDoc classDoc = classDocs[i];
private void printSplitIndex()
throws IOException
{
- Map categorizedIndex = getCategorizedIndex();
- Iterator it = categorizedIndex.keySet().iterator();
+ Map<Character,List<Doc>> categorizedIndex = getCategorizedIndex();
+ Iterator<Character> it = categorizedIndex.keySet().iterator();
int n = 1;
int count = categorizedIndex.size();
while (it.hasNext()) {
- Character c = (Character)it.next();
- List classList = (List)categorizedIndex.get(c);
+ Character c = it.next();
+ List<Doc> classList = categorizedIndex.get(c);
printIndexPage(n++, count, c, classList);
}
}
printIndexPage(0, 0, null, null);
}
- private void printIndexPage(int index, int maxIndex, Character letter, List classList)
+ private void printIndexPage(int index, int maxIndex, Character letter, List<Doc> classList)
throws IOException
{
String pageName = "alphaindex";
printIndexCategory(output, letter, classList);
}
else {
- Map categorizedIndex = getCategorizedIndex();
- Iterator categoryIt = categorizedIndex.keySet().iterator();
+ Map<Character,List<Doc>> categorizedIndex = getCategorizedIndex();
+ Iterator<Character> categoryIt = categorizedIndex.keySet().iterator();
while (categoryIt.hasNext()) {
- letter = (Character)categoryIt.next();
- classList = (List)categorizedIndex.get(letter);
+ letter = categoryIt.next();
+ classList = categorizedIndex.get(letter);
output.anchorName(letter.toString());
printIndexCategory(output, letter, classList);
}
output.div(CssClass.SERIALIZED_TITLE, "Serialized Form");
- Iterator it = getAllPackages().iterator();
+ Iterator<PackageDoc> it = getAllPackages().iterator();
while (it.hasNext()) {
- PackageDoc packageDoc = (PackageDoc)it.next();
+ PackageDoc packageDoc = it.next();
- List serializableClasses = new LinkedList();
+ List<ClassDoc> serializableClasses = new LinkedList<ClassDoc>();
ClassDoc[] classes = packageDoc.allClasses();
for (int i=0; i<classes.length; ++i) {
ClassDoc classDoc = classes[i];
if (!serializableClasses.isEmpty()) {
output.div(CssClass.SERIALIZED_PACKAGE_HEADER, "Package " + packageDoc.name());
- Iterator cit = serializableClasses.iterator();
+ Iterator<ClassDoc> cit = serializableClasses.iterator();
while (cit.hasNext()) {
- ClassDoc classDoc = (ClassDoc)cit.next();
+ ClassDoc classDoc = cit.next();
output.anchorName(classDoc.qualifiedTypeName());
output.div(CssClass.DEPRECATION_TITLE, "Deprecated API");
- List deprecatedInterfaces = new LinkedList();
- List deprecatedExceptions = new LinkedList();
- List deprecatedErrors = new LinkedList();
- List deprecatedClasses = new LinkedList();
- List deprecatedFields = new LinkedList();
- List deprecatedMethods = new LinkedList();
- List deprecatedConstructors = new LinkedList();
+ List<ClassDoc> deprecatedInterfaces = new LinkedList<ClassDoc>();
+ List<ClassDoc> deprecatedExceptions = new LinkedList<ClassDoc>();
+ List<ClassDoc> deprecatedErrors = new LinkedList<ClassDoc>();
+ List<ClassDoc> deprecatedClasses = new LinkedList<ClassDoc>();
+ List<FieldDoc> deprecatedFields = new LinkedList<FieldDoc>();
+ List<MethodDoc> deprecatedMethods = new LinkedList<MethodDoc>();
+ List<ConstructorDoc> deprecatedConstructors = new LinkedList<ConstructorDoc>();
ClassDoc[] classDocs = getRootDoc().classes();
for (int i=0; i<classDocs.length; ++i) {
PackageDoc packageDoc = classDoc.containingPackage();
ExternalDocSet externalDocSet = null;
if (classDoc.containingPackage().name().length() > 0) {
- externalDocSet = (ExternalDocSet)packageNameToDocSet.get(packageDoc.name());
+ externalDocSet = packageNameToDocSet.get(packageDoc.name());
}
StringBuffer result = new StringBuffer();
result.append(getClassDocURL(output, classDoc));
String url = null;
if (null != asClassDoc && asClassDoc.isIncluded()) {
url = getClassDocURL(output, asClassDoc);
- }
+ }
else if (!type.isPrimitive()) {
if (type.qualifiedTypeName().length() > type.typeName().length()) {
String packageName = type.qualifiedTypeName();
packageName = packageName.substring(0, packageName.length() - type.typeName().length() - 1);
- ExternalDocSet externalDocSet
- = (ExternalDocSet)packageNameToDocSet.get(packageName);
+ ExternalDocSet externalDocSet = packageNameToDocSet.get(packageName);
if (null != externalDocSet) {
url = externalDocSet.getClassDocURL(packageName, type.typeName());
}
private String getPackageURL(PackageDoc packageDoc)
{
if (packageDoc.name().length() > 0) {
- ExternalDocSet externalDocSet = (ExternalDocSet)packageNameToDocSet.get(packageDoc.name());
+ ExternalDocSet externalDocSet = packageNameToDocSet.get(packageDoc.name());
String url;
if (null != externalDocSet) {
url = externalDocSet.getPackageDocURL(packageDoc.name());
{
ExternalDocSet externalDocSet = null;
if (classDoc.containingPackage().name().length() > 0) {
- externalDocSet = (ExternalDocSet)packageNameToDocSet.get(classDoc.containingPackage().name());
+ externalDocSet = packageNameToDocSet.get(classDoc.containingPackage().name());
}
if (null != externalDocSet) {
return externalDocSet.getClassDocURL(classDoc.containingPackage().name(),
/* gnu.classpath.tools.gjdoc.ClassDocImpl
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2012 Free Software Foundation, Inc.
This file is part of GNU Classpath.
return filter ? filteredFields : unfilteredFields;
}
- private static Set primitiveNames;
+ private static Set<String> primitiveNames;
static {
- primitiveNames = new HashSet();
+ primitiveNames = new HashSet<String>();
primitiveNames.add("int");
primitiveNames.add("long");
primitiveNames.add("char");
primitiveNames.add("boolean");
}
- private Map findClassCache = new HashMap();
+ private Map<String,ClassDoc> findClassCache = new HashMap<String,ClassDoc>();
public ClassDoc findClass(String className, String dimension)
{
- ClassDoc cached = (ClassDoc)findClassCache.get(className + dimension);
+ ClassDoc cached = findClassCache.get(className + dimension);
if (null != cached) {
return cached;
}
ClassDoc[] importedClasses,
PackageDoc[] importedPackages,
char[] source, int startIndex, int endIndex,
- List importStatementList) throws ParseException, IOException {
+ List<String> importStatementList) throws ParseException, IOException {
String superclassName = "java.lang.Object";
importedPackages,
null);
rc.setImportStatementList(importStatementList);
- List implementedInterfaces = new ArrayList();
+ List<String> implementedInterfaces = new ArrayList<String>();
String word="";
int item=0;
ClassDoc[] interfaces=new ClassDoc[implementedInterfaces.size()];
for (int i=0; i<interfaces.length; ++i) {
- interfaces[i]=new ClassDocProxy((String)implementedInterfaces.get(i), rc);
+ interfaces[i]=new ClassDocProxy(implementedInterfaces.get(i), rc);
}
rc.setInterfaces(interfaces);
}
}
- List isSerMethodList=new ArrayList();
+ List<MethodDoc> isSerMethodList = new ArrayList<MethodDoc>();
if (null != maybeSerMethodList) {
- for (Iterator it=maybeSerMethodList.iterator(); it.hasNext(); ) {
+ for (Iterator<MethodDoc> it = maybeSerMethodList.iterator(); it.hasNext(); ) {
MethodDocImpl method=(MethodDocImpl)it.next();
method.resolve();
isSerMethodList.add(method);
}
}
- this.serializationMethods=(MethodDoc[])isSerMethodList.toArray(new MethodDoc[0]);
+ this.serializationMethods = isSerMethodList.toArray(new MethodDoc[isSerMethodList.size()]);
maybeSerMethodList=null;
}
}
this.importedClasses=importedClasses;
}
- private static Map typeMap = new HashMap();
+ private static Map<String,Type> typeMap = new HashMap<String,Type>();
Type typeForString(String typeName) throws ParseException {
- String orgTypename=typeName;
+ //String orgTypename=typeName;
int ndx=typeName.indexOf('[');
String dim="";
if (ndx>=0) {
return classDoc;
}
- Type type = (Type)typeMap.get(typeName+dim);
+ Type type = typeMap.get(typeName+dim);
if (null!=type) {
try {
if (type.dimension().equals(dim)) {
return (o!=null) && (o instanceof ClassDoc) && ((ClassDoc)o).qualifiedName().equals(qualifiedName());
}
- private List maybeSerMethodList;
+ private List<MethodDoc> maybeSerMethodList;
- void setMaybeSerMethodList(List maybeSerMethodList) {
+ void setMaybeSerMethodList(List<MethodDoc> maybeSerMethodList) {
this.maybeSerMethodList=maybeSerMethodList;
}
private Object findFieldValue(String identifier,
ClassDoc classDoc,
String fieldName,
- Set visitedFields)
+ Set<FieldDoc> visitedFields)
throws UnknownIdentifierException, IllegalExpressionException
{
while (classDoc != null) {
throw new UnknownIdentifierException(identifier);
}
- public Object getValue(String identifier, Set visitedFields)
+ public Object getValue(String identifier, Set<FieldDoc> visitedFields)
throws UnknownIdentifierException, IllegalExpressionException
{
int ndx = identifier.lastIndexOf('.');
}
// Compares this Object with the specified Object for order.
- public int compareTo(java.lang.Object o) {
+ public int compareTo(Doc d) {
int rc;
- if (o instanceof ClassDocImpl) {
+ if (d instanceof ClassDocImpl) {
ClassDocImpl c1 = this;
- ClassDocImpl c2 = (ClassDocImpl)o;
+ ClassDocImpl c2 = (ClassDocImpl)d;
if (null != c1.containingClass() && null == c2.containingClass()) {
rc = c1.containingClass().compareTo(c2);
}
}
- rc = super.compareTo(o);
+ rc = super.compareTo(d);
if (0 == rc) {
return Main.getInstance().getCollator().compare(containingPackage().name(),
- ((ClassDocImpl)o).containingPackage().name());
+ c2.containingPackage().name());
}
else {
return rc;
}
}
- private List importStatementList;
+ private List<String> importStatementList;
- public void setImportStatementList(List importStatementList)
+ public void setImportStatementList(List<String> importStatementList)
{
- this.importStatementList = new LinkedList();
+ this.importStatementList = new LinkedList<String>();
this.importStatementList.addAll(importStatementList);
}
/* gnu.classpath.tools.gjdoc.ClassDocProxy
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2012 Free Software Foundation, Inc.
This file is part of GNU Classpath.
}
// Compares this Object with the specified Object for order.
- public int compareTo(java.lang.Object o) {
- if (o instanceof Doc) {
- return Main.getInstance().getCollator().compare(name(), ((Doc)o).name());
- }
- else {
- return 0;
- }
+ public int compareTo(Doc d) {
+ return Main.getInstance().getCollator().compare(name(), d.name());
}
public TypeVariable[] typeParameters() { return new TypeVariable[0]; }
/* gnu.classpath.tools.gjdoc.ClassDocReflectedImpl
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2012 Free Software Foundation, Inc.
This file is part of GNU Classpath.
package gnu.classpath.tools.gjdoc;
-import com.sun.javadoc.*;
+import com.sun.javadoc.Doc;
+import com.sun.javadoc.ClassDoc;
+import com.sun.javadoc.ConstructorDoc;
+import com.sun.javadoc.FieldDoc;
+import com.sun.javadoc.MethodDoc;
+import com.sun.javadoc.PackageDoc;
+import com.sun.javadoc.SeeTag;
+import com.sun.javadoc.SourcePosition;
+import com.sun.javadoc.Tag;
+import com.sun.javadoc.TypeVariable;
+
import java.util.Map;
import java.util.HashMap;
public boolean definesSerializableFields() { return false; }
public FieldDoc[] fields() { return new FieldDoc[0]; }
public FieldDoc[] fields(boolean filtered) { return new FieldDoc[0]; }
- public ClassDoc findClass(java.lang.String className) { return null; }
+ public ClassDoc findClass(String className) { return null; }
public ClassDoc[] importedClasses() { return new ClassDoc[0]; }
public PackageDoc[] importedPackages() { return new PackageDoc[0]; }
public ClassDoc[] innerClasses() { return new ClassDoc[0]; }
public String toString() { return "ClassDocReflectedImpl{"+qualifiedName()+"}"; }
- public int compareTo(java.lang.Object o) {
- if (o instanceof Doc) {
- return Main.getInstance().getCollator().compare(name(), ((Doc)o).name());
- }
- else {
- return 0;
- }
+ public int compareTo(Doc d) {
+ return Main.getInstance().getCollator().compare(name(), d.name());
}
public String dimension() { return dimension; }
/* gnu.classpath.tools.gjdoc.DocImpl
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2012 Free Software Foundation, Inc.
This file is part of GNU Classpath.
}
// Compares this Object with the specified Object for order.
- public int compareTo(java.lang.Object o) {
- return Main.getInstance().getCollator().compare(name(), ((Doc)o).name());
+ public int compareTo(Doc d) {
+ return Main.getInstance().getCollator().compare(name(), d.name());
}
// Return the first sentence of the comment as tags.
/* gnu.classpath.tools.gjdoc.ExecutableMemberDocImpl
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2012 Free Software Foundation, Inc.
This file is part of GNU Classpath.
}
- public int compareTo(Object other) {
+ public int compareTo(Doc d) {
int rc;
- if (other instanceof MemberDocImpl) {
- MemberDocImpl otherMember = (MemberDocImpl)other;
+ if (d instanceof MemberDocImpl) {
+ MemberDocImpl otherMember = (MemberDocImpl)d;
rc = name().compareTo(otherMember.name());
if (0 == rc) {
- if (other instanceof ExecutableMemberDocImpl) {
- rc = signature().compareTo(((ExecutableMemberDocImpl)other).signature());
+ if (d instanceof ExecutableMemberDocImpl) {
+ rc = signature().compareTo(((ExecutableMemberDocImpl)d).signature());
if (0 == rc) {
return containingClass().compareTo(otherMember.containingClass());
}
/* gnu.classpath.tools.gjdoc.FieldDocImpl
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2012 Free Software Foundation, Inc.
This file is part of GNU Classpath.
}
}
- public static Collection createFromSource(ClassDoc containingClass,
- PackageDoc containingPackage,
- char[] source, int startIndex, int endIndex) {
+ public static Collection<FieldDoc> createFromSource(ClassDoc containingClass,
+ PackageDoc containingPackage,
+ char[] source, int startIndex, int endIndex) {
- List rcList=new ArrayList();
+ List<FieldDoc> rcList=new ArrayList<FieldDoc>();
FieldDocImpl fd=new FieldDocImpl(containingClass,
containingPackage,
final int STATE_COMMENT = 7;
final int STATE_LINECOMMENT = 8;
- int lastFieldDefStart = ndx;
int state = STATE_FIELDNAME;
int prevState = state;
return constantValue(new HashSet());
}
- public Object constantValue(Set visitedFields) {
+ public Object constantValue(Set<FieldDoc> visitedFields) {
if (!isStatic()
|| !isFinal()
|| (!type().isPrimitive() && !"java.lang.String".equals(type().qualifiedTypeName()))
/* gnu.classpath.tools.gjdoc.Main
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2012 Free Software Foundation, Inc.
This file is part of GNU Classpath.
*/
private String option_doclet = "gnu.classpath.tools.doclets.htmldoclet.HtmlDoclet";
- /**
- * Option "-overview": path to the special overview file.
- */
- private String option_overview;
-
/**
* Option "-coverage": which members to include in generated documentation.
*/
*/
private String option_docletpath;
- /**
- * Option "-classpath": path to additional classes.
- */
- private String option_classpath;
-
/**
* Option "-sourcepath": path to the Java source files to be documented.
* FIXME: this should be a list of paths
*/
- private List option_sourcepath = new ArrayList();
-
- /**
- * Option "-extdirs": path to Java extension files.
- */
- private String option_extdirs;
-
- /**
- * Option "-verbose": Be verbose when generating documentation.
- */
- private boolean option_verbose;
-
- /**
- * Option "-nowarn": Do not print warnings.
- */
- private boolean option_nowarn;
+ private List<File> option_sourcepath = new ArrayList<File>();
/**
* Option "-locale:" Specify the locale charset of Java source files.
*/
private String option_encoding;
- /**
- * Option "-J": Specify flags to be passed to Java runtime.
- */
- private List option_java_flags = new LinkedList(); //ArrayList();
-
/**
* Option "-source:" should be 1.4 to handle assertions, 1.1 is no
* longer supported.
* Option "-subpackages": list of subpackages to be recursively
* added.
*/
- private List option_subpackages = new ArrayList();
+ private List<String> option_subpackages = new ArrayList<String>();
/**
* Option "-exclude": list of subpackages to exclude.
*/
- private List option_exclude = new ArrayList();
+ private List<String> option_exclude = new ArrayList<String>();
/**
* Option "-breakiterator" - whether to use BreakIterator for
*
* @param allOptions List of all command line tokens
*/
- private boolean startDoclet(List allOptions)
+ private boolean startDoclet(List<String> allOptions)
{
try
Debug.log(1, "loading doclet class...");
- Class docletClass;
+ Class<?> docletClass;
if (null != option_docletpath) {
try {
//--- Feed the custom command line tokens to the Doclet
// stores all recognized options
- List options = new LinkedList();
+ List<String[]> options = new LinkedList<String[]>();
// stores packages and classes defined on the command line
- List packageAndClasses = new LinkedList();
+ List<String> packageAndClasses = new LinkedList<String>();
- for (Iterator it = allOptions.iterator(); it.hasNext();)
+ for (Iterator<String> it = allOptions.iterator(); it.hasNext();)
{
- String option = (String) it.next();
+ String option = it.next();
Debug.log(9, "parsing option '" + option + "'");
// check that it exists and find out whether it is a class
// or a package
- for (Iterator it = option_subpackages.iterator(); it.hasNext();)
+ for (Iterator<String> it = option_subpackages.iterator(); it.hasNext();)
{
- String subpackage = (String) it.next();
- Set foundPackages = new LinkedHashSet();
+ String subpackage = it.next();
+ Set<String> foundPackages = new LinkedHashSet<String>();
- for (Iterator pit = option_sourcepath.iterator(); pit.hasNext(); ) {
- File sourceDir = (File)pit.next();
+ for (Iterator<File> pit = option_sourcepath.iterator(); pit.hasNext(); ) {
+ File sourceDir = pit.next();
File packageDir = new File(sourceDir, subpackage.replace('.', File.separatorChar));
findPackages(subpackage, packageDir, foundPackages);
}
}
if (option_all) {
- Set foundPackages = new LinkedHashSet();
- for (Iterator pit = option_sourcepath.iterator(); pit.hasNext(); ) {
- File sourceDir = (File)pit.next();
+ Set<String> foundPackages = new LinkedHashSet<String>();
+ for (Iterator<File> pit = option_sourcepath.iterator(); pit.hasNext(); ) {
+ File sourceDir = pit.next();
findPackages("", sourceDir, foundPackages);
}
addFoundPackages(null, foundPackages);
- for (Iterator packageIt = foundPackages.iterator(); packageIt.hasNext(); ) {
- String packageName = (String)packageIt.next();
+ for (Iterator<String> packageIt = foundPackages.iterator(); packageIt.hasNext(); ) {
+ String packageName = packageIt.next();
if (null == packageName) {
packageName = "";
}
}
}
- for (Iterator it = packageAndClasses.iterator(); it.hasNext();)
+ for (Iterator<String> it = packageAndClasses.iterator(); it.hasNext();)
{
- String classOrPackage = (String) it.next();
+ String classOrPackage = it.next();
boolean foundSourceFile = false;
if (classOrPackage.endsWith(".java")) {
- for (Iterator pit = option_sourcepath.iterator(); pit.hasNext() && !foundSourceFile; ) {
- File sourceDir = (File)pit.next();
+ for (Iterator<File> pit = option_sourcepath.iterator(); pit.hasNext() && !foundSourceFile; ) {
+ File sourceDir = pit.next();
File sourceFile = new File(sourceDir, classOrPackage);
if (sourceFile.exists() && !sourceFile.isDirectory()) {
rootDoc.addSpecifiedSourceFile(sourceFile);
//--- Create one file object each for a possible package directory
// and a possible class file, and find out if they exist.
- List packageDirs = rootDoc.findSourceFiles(classOrPackageRelPath);
- List sourceFiles = rootDoc.findSourceFiles(classOrPackageRelPath + ".java");
+ List<File> packageDirs = rootDoc.findSourceFiles(classOrPackageRelPath);
+ List<File> sourceFiles = rootDoc.findSourceFiles(classOrPackageRelPath + ".java");
boolean packageDirExists = !packageDirs.isEmpty();
boolean sourceFileExists = !sourceFiles.isEmpty();
else
if (packageDirExists) {
- Iterator packageDirIt = packageDirs.iterator();
+ Iterator<File> packageDirIt = packageDirs.iterator();
boolean packageDirFound = false;
while (packageDirIt.hasNext()) {
- File packageDir = (File)packageDirIt.next();
+ File packageDir = packageDirIt.next();
if (packageDir.isDirectory()) {
rootDoc.addSpecifiedPackageName(classOrPackage);
packageDirFound = true;
}
}
- private void addFoundPackages(String subpackage, Set foundPackages)
+ private void addFoundPackages(String subpackage, Set<String> foundPackages)
{
if (foundPackages.isEmpty()) {
reporter.printWarning("No classes found under subpackage " + subpackage);
}
else {
boolean onePackageAdded = false;
- for (Iterator rit = foundPackages.iterator(); rit.hasNext();) {
- String foundPackage = (String)rit.next();
+ for (Iterator<String> rit = foundPackages.iterator(); rit.hasNext();) {
+ String foundPackage = rit.next();
boolean excludeThisPackage = false;
- for (Iterator eit = option_exclude.iterator(); eit.hasNext();) {
- String excludePackage = (String)eit.next();
+ for (Iterator<String> eit = option_exclude.iterator(); eit.hasNext();) {
+ String excludePackage = eit.next();
if (foundPackage.equals(excludePackage) ||
foundPackage.startsWith(excludePackage + ":")) {
excludeThisPackage = true;
*/
private void findPackages(String subpackage,
File packageDir,
- Set result)
+ Set<String> result)
{
File[] files = packageDir.listFiles();
if (null != files) {
//--- Collect unparsed arguments in array and resolve references
// to external argument files.
- List arguments = new ArrayList(args.length);
+ List<String> arguments = new ArrayList<String>(args.length);
for (int i = 0; i < args.length; ++i)
{
// Contains objects of type String[], where each entry
// specifies an option along with its aguments.
- List options = new LinkedList();
+ List<String[]> options = new LinkedList<String[]>();
//--- This will hold all command line tokens not recognized
// to be part of a standard option.
// Contains objects of type String, where each entry is
// one unrecognized token.
- List customOptions = new LinkedList();
+ List<String> customOptions = new LinkedList<String>();
rootDoc = new RootDocImpl();
reporter = rootDoc.getReporter();
//--- Iterate over all options given on the command line
- for (Iterator it = arguments.iterator(); it.hasNext();)
+ for (Iterator<String> it = arguments.iterator(); it.hasNext();)
{
- String arg = (String) it.next();
+ String arg = it.next();
//--- Check if gjdoc recognizes this option as a standard option
// and remember the options' argument count
//--- Create an array of String arrays from the dynamic array built above
- String[][] optionArr = (String[][]) options.toArray(new String[options
- .size()][0]);
+ String[][] optionArr = options.toArray(new String[options.size()][0]);
//--- Validate all options and issue warnings/errors
return reporter.getErrorCount();
}
+ /*
private void addJavaLangClasses()
throws IOException
{
}
}
}
+ */
/**
* Helper class for parsing command line arguments. An instance of this class
* Initialized only once by method initOptions(). FIXME: Rename to
* 'optionProcessors'.
*/
- private static Map options = null;
+ private static Map<String,OptionProcessor> options = null;
/**
* Initialize all OptionProcessor objects needed to scan/parse command line
private void initOptions()
{
- options = new HashMap();
+ options = new HashMap<String,OptionProcessor>();
//--- Put one OptionProcessor object into the map
// for each option recognized.
void process(String[] args)
{
- option_overview = args[0];
+ System.err.println("WARNING: Unsupported option -overview ignored");
}
});
options.put("-public", new OptionProcessor(1)
void process(String[] args)
{
- option_nowarn = true;
+ System.err.println("WARNING: Unsupported option -nowarn ignored");
}
});
options.put("-source", new OptionProcessor(2)
void process(String[] args)
{
- option_verbose = true;
System.err.println("WARNING: Unsupported option -verbose ignored");
}
});
/* gnu.classpath.tools.gjdoc.MemberDocImpl
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2012 Free Software Foundation, Inc.
This file is part of GNU Classpath.
return Main.getInstance().includeAccessLevel(accessLevel);
}
- public int compareTo(Object o) {
- if (o instanceof MemberDocImpl) {
- int rc=name().compareTo(((MemberDocImpl)o).name());
+ public int compareTo(Doc d) {
+ if (d instanceof MemberDocImpl) {
+ int rc=name().compareTo(((MemberDocImpl)d).name());
if (rc==0)
- rc=containingClass().qualifiedName().compareTo(((MemberDocImpl)o).containingClass().qualifiedName());
+ rc=containingClass().qualifiedName().compareTo(((MemberDocImpl)d).containingClass().qualifiedName());
return rc;
}
else {
- return super.compareTo(o);
+ return super.compareTo(d);
}
}
/* gnu.classpath.tools.gjdoc.PackageDocImpl
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2012 Free Software Foundation, Inc.
This file is part of GNU Classpath.
private String packageName;
private File packageDirectory;
- private Set allClassesSet = new TreeSet();
- private List ordinaryClassesList = new ArrayList();
- private List exceptionsList = new ArrayList();
- private List interfacesList = new ArrayList();
- private List errorsList = new ArrayList();
+ private Set<ClassDoc> allClassesSet = new TreeSet<ClassDoc>();
+ private List<ClassDoc> ordinaryClassesList = new ArrayList<ClassDoc>();
+ private List<ClassDoc> exceptionsList = new ArrayList<ClassDoc>();
+ private List<ClassDoc> interfacesList = new ArrayList<ClassDoc>();
+ private List<ClassDoc> errorsList = new ArrayList<ClassDoc>();
private ClassDoc[] allClasses;
private ClassDoc[] ordinaryClasses;
}
public void resolve() {
- for (Iterator it=allClassesSet.iterator(); it.hasNext(); ) {
- ClassDocImpl classDoc=(ClassDocImpl)it.next();
+ for (Iterator<ClassDoc> it = allClassesSet.iterator(); it.hasNext(); ) {
+ ClassDocImpl classDoc = (ClassDocImpl) it.next();
try {
classDoc.resolve();
} catch (ParseException e) {
return this.errors;
}
- private ClassDoc[] toClassDocArray(Collection classDocList)
+ private ClassDoc[] toClassDocArray(Collection<ClassDoc> classDocList)
{
- ClassDoc[] result = (ClassDoc[])classDocList.toArray(new ClassDoc[classDocList.size()]);
+ ClassDoc[] result = classDocList.toArray(new ClassDoc[classDocList.size()]);
Arrays.sort(result);
return result;
}
return packageName;
}
- public int compareTo(Object o) {
- if (o!=null && o instanceof PackageDocImpl)
- return name().compareTo(((PackageDocImpl)o).name());
+ public int compareTo(Doc d) {
+ if (d !=null && d instanceof PackageDocImpl)
+ return name().compareTo(((PackageDocImpl)d).name());
else
return 0;
}
/* gnu.classpath.tools.gjdoc.Parser
- Copyright (C) 2001, 2005, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2005, 2008, 2012 Free Software Foundation, Inc.
This file is part of GNU Classpath.
package gnu.classpath.tools.gjdoc;
-import java.io.*;
+import com.sun.javadoc.ClassDoc;
+import com.sun.javadoc.ConstructorDoc;
+import com.sun.javadoc.FieldDoc;
+import com.sun.javadoc.MethodDoc;
+import com.sun.javadoc.PackageDoc;
+
+import gnu.classpath.tools.IOToolkit;
+import gnu.classpath.tools.NotifyingInputStreamReader;
+import gnu.classpath.tools.MalformedInputListener;
+import gnu.classpath.tools.MalformedInputEvent;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.io.IOException;
+import java.io.Reader;
+
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CoderResult;
import java.nio.charset.CodingErrorAction;
-import java.util.*;
-import com.sun.javadoc.*;
-
-import gnu.classpath.tools.IOToolkit;
-import gnu.classpath.tools.NotifyingInputStreamReader;
-import gnu.classpath.tools.MalformedInputListener;
-import gnu.classpath.tools.MalformedInputEvent;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+import java.util.Stack;
class IgnoredFileParseException extends ParseException
{
if (endIndex-startIndex<=1) return endIndex;
//assert (parser.ctx!=null);
- Collection fields=FieldDocImpl.createFromSource(parser.ctx.classDoc,
- parser.ctx.classDoc.containingPackage(),
- source, startIndex, endIndex);
+ Collection<FieldDoc> fields = FieldDocImpl.createFromSource(parser.ctx.classDoc,
+ parser.ctx.classDoc.containingPackage(),
+ source, startIndex, endIndex);
- for (Iterator it=fields.iterator(); it.hasNext(); ) {
+ for (Iterator<FieldDoc> it=fields.iterator(); it.hasNext(); ) {
FieldDocImpl field=(FieldDocImpl)it.next();
boolean fieldHasSerialTag=!field.isTransient() && !field.isStatic(); //field.hasSerialTag();
if ((field.isIncluded() || fieldHasSerialTag) && parser.getAddComments()) {
parser.setLastComment(null);
if (execDoc.isMethod()) {
- parser.ctx.methodList.add(execDoc);
- if (execDoc.isIncluded()) {
- parser.ctx.filteredMethodList.add(execDoc);
+ MethodDoc methDoc = (MethodDoc) execDoc;
+ parser.ctx.methodList.add(methDoc);
+ if (methDoc.isIncluded()) {
+ parser.ctx.filteredMethodList.add(methDoc);
}
- }
- else {
- parser.ctx.constructorList.add(execDoc);
- if (execDoc.isIncluded()) {
- parser.ctx.filteredConstructorList.add(execDoc);
- }
- }
-
- if (execDoc.isMethod()
- && (execDoc.name().equals("readObject")
- || execDoc.name().equals("writeObject")
- || execDoc.name().equals("readExternal")
- || execDoc.name().equals("writeExternal")
- || execDoc.name().equals("readResolve"))) {
+ if (methDoc.name().equals("readObject")
+ || methDoc.name().equals("writeObject")
+ || methDoc.name().equals("readExternal")
+ || methDoc.name().equals("writeExternal")
+ || methDoc.name().equals("readResolve")) {
// FIXME: add readExternal here?
- parser.ctx.maybeSerMethodList.add(execDoc);
+ parser.ctx.maybeSerMethodList.add(methDoc);
+ }
+ } else {
+ ConstructorDoc constDoc = (ConstructorDoc) execDoc;
+ parser.ctx.constructorList.add(constDoc);
+ if (constDoc.isIncluded()) {
+ parser.ctx.filteredConstructorList.add(constDoc);
+ }
}
return endIndex;
return processedFiles.size();
}
- static Set processedFiles = new HashSet();
+ static Set<File> processedFiles = new HashSet<File>();
ClassDocImpl processSourceFile(File file, boolean addComments,
String encoding, String expectedPackageName)
try {
parse(source, 0, sourceLevelComponents);
- ClassDoc[] importedClasses=(ClassDoc[])importedClassesList.toArray(new ClassDoc[0]);
- PackageDoc[] importedPackages=(PackageDoc[])importedPackagesList.toArray(new PackageDoc[0]);
+ ClassDoc[] importedClasses = importedClassesList.toArray(new ClassDoc[importedClassesList.size()]);
+ PackageDoc[] importedPackages = importedPackagesList.toArray(new PackageDoc[importedPackagesList.size()]);
if (Main.DESCEND_IMPORTED) {
for (int i=0; i<importedClasses.length; ++i) {
ClassDocImpl classDoc
= ClassDocImpl.createInstance((ctx!=null)?(ctx.classDoc):null, currentPackage,
null,
- (PackageDoc[])importedPackagesList.toArray(new PackageDoc[0]),
+ importedPackagesList.toArray(new PackageDoc[importedPackagesList.size()]),
source, startIndex, endIndex,
importedStatementList);
}
if (importedClassesList.isEmpty()) {
- for (Iterator it=importedStringList.iterator(); it.hasNext(); ) {
- importedClassesList.add(new ClassDocProxy((String)it.next(), classDoc));
+ for (Iterator<String> it=importedStringList.iterator(); it.hasNext(); ) {
+ importedClassesList.add(new ClassDocProxy(it.next(), classDoc));
}
}
- classDoc.setImportedClasses((ClassDoc[])importedClassesList.toArray(new ClassDoc[0]));
+ classDoc.setImportedClasses(importedClassesList.toArray(new ClassDoc[importedClassesList.size()]));
currentPackage.addClass(classDoc);
//Debug.log(9,"ctx="+ctx);
}
- private Doc[] toArray(List list, Doc[] template)
+ private <T> T[] toArray(List<T> list, T[] template)
{
- Doc[] result = (Doc[])list.toArray(template);
- return result;
+ return list.toArray(template);
}
void classClosed() throws ParseException, IOException {
- ctx.classDoc.setFields((FieldDoc[])toArray(ctx.fieldList,
- new FieldDoc[0]));
- ctx.classDoc.setFilteredFields((FieldDoc[])toArray(ctx.filteredFieldList,
- new FieldDoc[0]));
- ctx.classDoc.setSerializableFields((FieldDoc[])toArray(ctx.sfieldList, new FieldDoc[0]));
- ctx.classDoc.setMethods((MethodDoc[])toArray(ctx.methodList, new MethodDoc[0]));
- ctx.classDoc.setFilteredMethods((MethodDoc[])toArray(ctx.filteredMethodList, new MethodDoc[0]));
+ ctx.classDoc.setFields(toArray(ctx.fieldList,new FieldDoc[ctx.fieldList.size()]));
+ ctx.classDoc.setFilteredFields(toArray(ctx.filteredFieldList,new FieldDoc[ctx.filteredFieldList.size()]));
+ ctx.classDoc.setSerializableFields(toArray(ctx.sfieldList, new FieldDoc[ctx.sfieldList.size()]));
+ ctx.classDoc.setMethods(toArray(ctx.methodList, new MethodDoc[ctx.methodList.size()]));
+ ctx.classDoc.setFilteredMethods(toArray(ctx.filteredMethodList, new MethodDoc[ctx.filteredMethodList.size()]));
ctx.classDoc.setMaybeSerMethodList(ctx.maybeSerMethodList);
- ctx.classDoc.setConstructors((ConstructorDoc[])toArray(ctx.constructorList, new ConstructorDoc[0]));
- ctx.classDoc.setFilteredConstructors((ConstructorDoc[])toArray(ctx.filteredConstructorList, new ConstructorDoc[0]));
-
- ctx.classDoc.setInnerClasses((ClassDocImpl[])toArray(ctx.innerClassesList, new ClassDocImpl[0]));
- ctx.classDoc.setFilteredInnerClasses((ClassDocImpl[])toArray(ctx.filteredInnerClassesList, new ClassDocImpl[0]));
+ ctx.classDoc.setConstructors(toArray(ctx.constructorList, new ConstructorDoc[ctx.constructorList.size()]));
+ ctx.classDoc.setFilteredConstructors(toArray(ctx.filteredConstructorList,
+ new ConstructorDoc[ctx.filteredConstructorList.size()]));
+ ctx.classDoc.setInnerClasses(toArray(ctx.innerClassesList, new ClassDocImpl[ctx.innerClassesList.size()]));
+ ctx.classDoc.setFilteredInnerClasses(toArray(ctx.filteredInnerClassesList,
+ new ClassDocImpl[ctx.filteredInnerClassesList.size()]));
ctx.classDoc.setBoilerplateComment(boilerplateComment);
Main.getRootDoc().addClassDoc(ctx.classDoc);
class Context {
Context(ClassDocImpl classDoc) { this.classDoc=classDoc; }
ClassDocImpl classDoc = null;
- List fieldList = new LinkedList();
- List filteredFieldList = new LinkedList();
- List sfieldList = new LinkedList();
- List methodList = new LinkedList();
- List filteredMethodList = new LinkedList();
- List maybeSerMethodList = new LinkedList();
- List constructorList = new LinkedList();
- List filteredConstructorList = new LinkedList();
- List innerClassesList = new LinkedList();
- List filteredInnerClassesList = new LinkedList();
+ List<FieldDoc> fieldList = new LinkedList<FieldDoc>();
+ List<FieldDoc> filteredFieldList = new LinkedList<FieldDoc>();
+ List<FieldDoc> sfieldList = new LinkedList<FieldDoc>();
+ List<MethodDoc> methodList = new LinkedList<MethodDoc>();
+ List<MethodDoc> filteredMethodList = new LinkedList<MethodDoc>();
+ List<MethodDoc> maybeSerMethodList = new LinkedList<MethodDoc>();
+ List<ConstructorDoc> constructorList = new LinkedList<ConstructorDoc>();
+ List<ConstructorDoc> filteredConstructorList = new LinkedList<ConstructorDoc>();
+ List<ClassDocImpl> innerClassesList = new LinkedList<ClassDocImpl>();
+ List<ClassDocImpl> filteredInnerClassesList = new LinkedList<ClassDocImpl>();
}
File currentFile = null;
List allClassesList = new LinkedList();
List interfacesList = new LinkedList();
- List importedClassesList = new LinkedList();
- List importedStringList = new LinkedList();
- List importedPackagesList = new LinkedList();
- List importedStatementList = new LinkedList();
+ List<ClassDoc> importedClassesList = new LinkedList<ClassDoc>();
+ List<String> importedStringList = new LinkedList<String>();
+ List<PackageDoc> importedPackagesList = new LinkedList<PackageDoc>();
+ List<String> importedStatementList = new LinkedList<String>();
List referencedClassesList = new LinkedList();
/* gnu.classpath.tools.gjdoc.RootDocImpl
- Copyright (C) 2001, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2007, 2012 Free Software Foundation, Inc.
This file is part of GNU Classpath.
}
}
- List findSourceFiles(String relPath) {
+ List<File> findSourceFiles(String relPath) {
- List result = new LinkedList();
- for (Iterator it = sourcePath.iterator(); it.hasNext(); ) {
- File path = (File)it.next();
+ List<File> result = new LinkedList<File>();
+ for (Iterator<File> it = sourcePath.iterator(); it.hasNext(); ) {
+ File path = it.next();
File file = new File(path, relPath);
if (file.exists()) {
result.add(file);
/* gnu.classpath.tools.gjdoc.expr.Evaluator
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2012 Free Software Foundation, Inc.
This file is part of GNU Classpath.
package gnu.classpath.tools.gjdoc.expr;
+import com.sun.javadoc.FieldDoc;
+
import java.io.StringReader;
import java.math.BigInteger;
import antlr.RecognitionException;
* array access) or references unknown static fields.
*/
public static Object evaluate(String expression,
- Set visitedFields,
+ Set<FieldDoc> visitedFields,
EvaluatorEnvironment environment)
throws IllegalExpressionException
{
/* gnu.classpath.tools.gjdoc.expr.EvaluatorEnvironment
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2012 Free Software Foundation, Inc.
This file is part of GNU Classpath.
package gnu.classpath.tools.gjdoc.expr;
+import com.sun.javadoc.FieldDoc;
+
import java.util.Set;
public interface EvaluatorEnvironment
{
- public Object getValue(String identifier, Set visitedFields)
+ public Object getValue(String identifier, Set<FieldDoc> visitedFields)
throws IllegalExpressionException, UnknownIdentifierException;
}
/* gnu.classpath.tools.gjdoc.expr.Type
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2012 Free Software Foundation, Inc.
This file is part of GNU Classpath.
public static final Type STRING = new Type(String.class);
public static final Type NULL = new Type(null);
- private Class clazz;
+ private Class<?> clazz;
- private Type(Class clazz)
+ private Type(Class<?> clazz)
{
this.clazz = clazz;
}
/* ClassRmicCompiler.java --
- Copyright (c) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005
+ Copyright (c) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2012
Free Software Foundation, Inc.
This file is part of GNU Classpath.
{
private String[] args;
private int next;
- private List errors = new ArrayList();
- private boolean keep = false;
+ private List<Exception> errors = new ArrayList<Exception>();
private boolean need11Stubs = true;
private boolean need12Stubs = true;
- private boolean compile = true;
private boolean verbose;
private boolean noWrite;
private String destination;
- private String classpath;
private ClassLoader loader;
private int errorCount = 0;
- private Class clazz;
+ private Class<?> clazz;
private String classname;
private String classInternalName;
private String fullclassname;
private MethodRef[] remotemethods;
private String stubname;
private String skelname;
- private List mRemoteInterfaces;
+ private List<Class<?>> mRemoteInterfaces;
/**
* @return true if run was successful
}
if (errors.size() > 0)
{
- for (Iterator it = errors.iterator(); it.hasNext(); )
+ for (Iterator<Exception> it = errors.iterator(); it.hasNext(); )
{
- Exception ex = (Exception) it.next();
+ Exception ex = it.next();
logError(ex);
}
}
remotemethods = null;
stubname = null;
skelname = null;
- mRemoteInterfaces = new ArrayList();
+ mRemoteInterfaces = new ArrayList<Class<?>>();
analyzeClass(cls);
generateStub();
*/
public Exception getException()
{
- return errors.size() == 0 ? null : (Exception) errors.get(0);
+ return errors.size() == 0 ? null : errors.get(0);
}
private void findClass()
}
}
- private static Type[] typeArray(Class[] cls)
+ private static Type[] typeArray(Class<?>[] cls)
{
Type[] t = new Type[cls.length];
for (int i = 0; i < cls.length; i++)
private static final String forName = "class$";
- private static Object param(Method m, int argIndex)
+ private static List<Object> param(Method m, int argIndex)
{
- List l = new ArrayList();
+ List<Object> l = new ArrayList<Object>();
l.add(m);
- l.add(new Integer(argIndex));
+ l.add(Integer.valueOf(argIndex));
return l;
}
cv.visitMaxs(-1, -1);
}
- private void generateClassConstant(MethodVisitor cv, Class cls) {
+ private void generateClassConstant(MethodVisitor cv, Class<?> cls) {
if (cls.isPrimitive())
{
- Class boxCls;
+ Class<?> boxCls;
if (cls.equals(Boolean.TYPE))
boxCls = Boolean.class;
else if (cls.equals(Character.TYPE))
new Type[] { Type.getType(String.class) }));
}
- private void generateClassArray(MethodVisitor code, Class[] classes)
+ private void generateClassArray(MethodVisitor code, Class<?>[] classes)
{
code.visitLdcInsn(new Integer(classes.length));
code.visitTypeInsn(Opcodes.ANEWARRAY, typeArg(Class.class));
desc.append(m.getName() + "(");
// signature
- Class[] sig = m.getParameterTypes();
+ Class<?>[] sig = m.getParameterTypes();
for (int j = 0; j < sig.length; j++)
{
desc.append(getPrettyName(sig[j]));
throws IOException
{
stubname = fullclassname + "_Stub";
- String stubclassname = classname + "_Stub";
File file = new File((destination == null ? "." : destination)
+ File.separator
+ stubname.replace('.', File.separatorChar)
Type.getType(RemoteStub.class).getInternalName();
String[] remoteInternalNames =
- internalNameArray((Class[]) mRemoteInterfaces.toArray(new Class[] {}));
+ internalNameArray(mRemoteInterfaces.toArray(new Class[mRemoteInterfaces.size()]));
stub.visit
(Opcodes.V1_2, Opcodes.ACC_PUBLIC + Opcodes.ACC_FINAL, classInternalName,
null, superInternalName, remoteInternalNames);
for (int i = 0; i < remotemethods.length; i++)
{
Method m = remotemethods[i].meth;
- Class[] sig = m.getParameterTypes();
- Class returntype = m.getReturnType();
- Class[] except = sortExceptions
- ((Class[]) remotemethods[i].exceptions.toArray(new Class[0]));
+ Class<?>[] sig = m.getParameterTypes();
+ Class<?> returntype = m.getReturnType();
+ Class<?>[] except = sortExceptions
+ (remotemethods[i].exceptions.toArray(new Class<?>[remotemethods[i].exceptions.size()]));
MethodVisitor code = stub.visitMethod
(Opcodes.ACC_PUBLIC,
for (int j = 0; j < sig.length; j++)
{
- int size = size(sig[j]);
int insn = loadOpcode(sig[j]);
- Class box = sig[j].isPrimitive() ? box(sig[j]) : null;
+ Class<?> box = sig[j].isPrimitive() ? box(sig[j]) : null;
code.visitVarInsn(Opcodes.ALOAD, var.get("argArray"));
code.visitLdcInsn(new Integer(j));
}
// push remote operation opcode
- code.visitLdcInsn(new Long(remotemethods[i].hash));
+ code.visitLdcInsn(Long.valueOf(remotemethods[i].hash));
code.visitMethodInsn
(Opcodes.INVOKEINTERFACE,
Type.getInternalName(RemoteRef.class),
if (! returntype.equals(Void.TYPE))
{
int retcode = returnOpcode(returntype);
- Class boxCls =
+ Class<?> boxCls =
returntype.isPrimitive() ? box(returntype) : null;
code.visitTypeInsn
(Opcodes.CHECKCAST, typeArg(boxCls == null ? returntype : boxCls));
// get j'th arg to remote method
code.visitVarInsn(loadOpcode(sig[j]), var.get(param(m, j)));
- Class argCls =
+ Class<?> argCls =
sig[j].isPrimitive() ? sig[j] : Object.class;
// out.writeFoo
Type.getMethodDescriptor
(Type.getType(ObjectInput.class), new Type[] {}));
- Class readCls =
+ Class<?> readCls =
returntype.isPrimitive() ? returntype : Object.class;
code.visitMethodInsn
(Opcodes.INVOKEINTERFACE,
Type.getType(Exception.class) }));
code.visitInsn(Opcodes.ATHROW);
- Label endReturnTryCatch = new Label();
-
// catch IOException
code.visitTryCatchBlock
(beginReturnTryCatch, handler, handler,
private void generateSkel() throws IOException
{
skelname = fullclassname + "_Skel";
- String skelclassname = classname + "_Skel";
File file = new File(destination == null ? "" : destination
+ File.separator
+ skelname.replace('.', File.separatorChar)
{
// assign opnum if hash matches supplied hash
dispatch.visitVarInsn(Opcodes.LLOAD, var.get("hash"));
- dispatch.visitLdcInsn(new Long(remotemethods[i].hash));
+ dispatch.visitLdcInsn(Long.valueOf(remotemethods[i].hash));
Label notIt = new Label();
dispatch.visitInsn(Opcodes.LCMP);
dispatch.visitJumpInsn(Opcodes.IFNE, notIt);
private void generateMethodSkel(MethodVisitor cv, Method m, Variables var)
{
- Class[] sig = m.getParameterTypes();
+ Class<?>[] sig = m.getParameterTypes();
Label readArgs = new Label();
cv.visitLabel(readArgs);
// dup input stream
cv.visitVarInsn(Opcodes.ALOAD, var.get("objectinput"));
- Class readCls = sig[i].isPrimitive() ? sig[i] : Object.class;
+ Class<?> readCls = sig[i].isPrimitive() ? sig[i] : Object.class;
// in.readFoo()
cv.visitMethodInsn
(Opcodes.INVOKEVIRTUAL, Type.getInternalName(clazz), m.getName(),
Type.getMethodDescriptor(m));
- Class returntype = m.getReturnType();
+ Class<?> returntype = m.getReturnType();
if (! returntype.equals(Void.TYPE))
{
cv.visitVarInsn
{
// out.writeFoo(result)
cv.visitVarInsn(loadOpcode(returntype), var.deallocate("result"));
- Class writeCls = returntype.isPrimitive() ? returntype : Object.class;
+ Class<?> writeCls = returntype.isPrimitive() ? returntype : Object.class;
cv.visitMethodInsn
(Opcodes.INVOKEINTERFACE,
Type.getInternalName(ObjectOutput.class),
Type.getInternalName(IOException.class));
}
- private static String typeArg(Class cls)
+ private static String typeArg(Class<?> cls)
{
if (cls.isArray())
return Type.getDescriptor(cls);
return Type.getInternalName(cls);
}
- private static String readMethod(Class cls)
+ private static String readMethod(Class<?> cls)
{
if (cls.equals(Void.TYPE))
throw new IllegalArgumentException("can not read void");
return method;
}
- private static String writeMethod(Class cls)
+ private static String writeMethod(Class<?> cls)
{
if (cls.equals(Void.TYPE))
throw new IllegalArgumentException("can not read void");
return method;
}
- private static int returnOpcode(Class cls)
+ private static int returnOpcode(Class<?> cls)
{
int returncode;
if (cls.equals(Boolean.TYPE))
return returncode;
}
- private static int loadOpcode(Class cls)
+ private static int loadOpcode(Class<?> cls)
{
if (cls.equals(Void.TYPE))
throw new IllegalArgumentException("can not load void");
return loadcode;
}
- private static int storeOpcode(Class cls)
+ private static int storeOpcode(Class<?> cls)
{
if (cls.equals(Void.TYPE))
throw new IllegalArgumentException("can not load void");
return storecode;
}
- private static String unboxMethod(Class primitive)
+ private static String unboxMethod(Class<?> primitive)
{
if (! primitive.isPrimitive())
throw new IllegalArgumentException("can not unbox nonprimitive");
return method;
}
- public static Class box(Class cls)
+ public static Class<?> box(Class<?> cls)
{
if (! cls.isPrimitive())
throw new IllegalArgumentException("can only box primitive");
- Class box;
+ Class<?> box;
if (cls.equals(Boolean.TYPE))
box = Boolean.class;
else if (cls.equals(Byte.TYPE))
return box;
}
- private static int size(Class cls) {
+ private static int size(Class<?> cls) {
if (cls.equals(Long.TYPE) || cls.equals(Double.TYPE))
return 2;
else
/**
* Sort exceptions so the most general go last.
*/
- private Class[] sortExceptions(Class[] except)
+ private Class<?>[] sortExceptions(Class<?>[] except)
{
for (int i = 0; i < except.length; i++)
{
{
if (except[i].isAssignableFrom(except[j]))
{
- Class tmp = except[i];
+ Class<?> tmp = except[i];
except[i] = except[j];
except[j] = tmp;
}
boolean noWrite, boolean verbose, boolean force, String classpath,
String bootclasspath, String extdirs, String outputDirectory)
{
- this.keep = keep;
this.need11Stubs = need11Stubs;
this.need12Stubs = need12Stubs;
this.verbose = verbose;
this.noWrite = noWrite;
// Set up classpath.
- this.classpath = classpath;
StringTokenizer st =
new StringTokenizer(classpath, File.pathSeparator);
URL[] u = new URL[st.countTokens()];
private void findRemoteMethods()
throws RMICException
{
- List rmeths = new ArrayList();
- for (Class cur = clazz; cur != null; cur = cur.getSuperclass())
+ List<Method> rmeths = new ArrayList<Method>();
+ for (Class<?> cur = clazz; cur != null; cur = cur.getSuperclass())
{
- Class[] interfaces = cur.getInterfaces();
+ Class<?>[] interfaces = cur.getInterfaces();
for (int i = 0; i < interfaces.length; i++)
{
if (java.rmi.Remote.class.isAssignableFrom(interfaces[i]))
{
- Class remoteInterface = interfaces[i];
+ Class<?> remoteInterface = interfaces[i];
if (verbose)
System.out.println
("[implements " + remoteInterface.getName() + "]");
boolean[] skip = new boolean[rmeths.size()];
for (int i = 0; i < skip.length; i++)
skip[i] = false;
- List methrefs = new ArrayList();
+ List<MethodRef> methrefs = new ArrayList<MethodRef>();
for (int i = 0; i < rmeths.size(); i++)
{
if (skip[i]) continue;
- Method current = (Method) rmeths.get(i);
+ Method current = rmeths.get(i);
MethodRef ref = new MethodRef(current);
for (int j = i+1; j < rmeths.size(); j++)
{
}
// Convert into a MethodRef array and sort them
- remotemethods = (MethodRef[])
+ remotemethods =
methrefs.toArray(new MethodRef[methrefs.size()]);
Arrays.sort(remotemethods);
}
{
Method meth;
long hash;
- List exceptions;
+ List<Class<?>> exceptions;
private String sig;
MethodRef(Method m) {
return true;
}
- private static List removeSubclasses(Class[] classes)
+ private static List<Class<?>> removeSubclasses(Class<?>[] classes)
{
- List list = new ArrayList();
+ List<Class<?>> list = new ArrayList<Class<?>>();
for (int i = 0; i < classes.length; i++)
{
- Class candidate = classes[i];
+ Class<?> candidate = classes[i];
boolean add = true;
for (int j = 0; j < classes.length; j++)
{
public void intersectExceptions(Method m)
{
- List incoming = removeSubclasses(m.getExceptionTypes());
+ List<Class<?>> incoming = removeSubclasses(m.getExceptionTypes());
- List updated = new ArrayList();
+ List<Class<?>> updated = new ArrayList<Class<?>>();
for (int i = 0; i < exceptions.size(); i++)
{
- Class outer = (Class) exceptions.get(i);
+ Class<?> outer = exceptions.get(i);
boolean addOuter = false;
for (int j = 0; j < incoming.size(); j++)
{
- Class inner = (Class) incoming.get(j);
+ Class<?> inner = incoming.get(j);
if (inner.equals(outer) || inner.isAssignableFrom(outer))
addOuter = true;
/* Main.java -- RMI stub generator.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2012 Free Software Foundation, Inc.
This file is part of GNU Classpath.
System.exit(1);
}
- ArrayList backends = new ArrayList();
+ ArrayList<RmicBackend> backends = new ArrayList<RmicBackend>();
// FIXME: need an IDL RmicBackend
// FIXME: need a ClassGiopRmicCompiler RmicBackend
for (int i = 0; i < backends.size(); i++)
{
- RmicBackend b = (RmicBackend) backends.get(i);
+ RmicBackend b = backends.get(i);
b.setup(keep, need11Stubs, need12Stubs,
iiop, poa, false, warnings,
noWrite, verbose, force, classpath,
{
StringBuilder b = new StringBuilder();
- Class[] args = method.getParameterTypes();
+ Class<?>[] args = method.getParameterTypes();
for (int i = 0; i < args.length; i++)
{
{
StringBuilder b = new StringBuilder();
- Class[] args = method.getParameterTypes();
+ Class<?>[] args = method.getParameterTypes();
for (int i = 0; i < args.length; i++)
{
{
StringBuilder b = new StringBuilder();
- Class[] args = method.getExceptionTypes();
+ Class<?>[] args = method.getExceptionTypes();
for (int i = 0; i < args.length; i++)
{
public String getStaticMethodDeclarations()
{
StringBuilder b = new StringBuilder();
- Class[] args = method.getParameterTypes();
+ Class<?>[] args = method.getParameterTypes();
for (int i = 0; i < args.length; i++)
{
/* SourceGiopRmicCompiler -- Central GIOP-based RMI stub and tie compiler class.
- Copyright (C) 2006, 2008 Free Software Foundation
+ Copyright (C) 2006, 2008, 2012 Free Software Foundation
This file is part of GNU Classpath.
* @author Audrius Meskauskas, Lithuania (audriusa@Bioinformatics.org)
*/
public class SourceGiopRmicCompiler
- extends Generator implements Comparator, RmicBackend
+ extends Generator implements Comparator<AbstractMethodGenerator>, RmicBackend
{
/** The package name. */
protected String packag;
/**
* The Remote's, implemented by this class.
*/
- protected Collection implementedRemotes = new HashSet();
+ protected Collection<Class<?>> implementedRemotes = new HashSet<Class<?>>();
/**
* The extra classes that must be imported.
*/
- protected Collection extraImports = new HashSet();
+ protected Collection<String> extraImports = new HashSet<String>();
/**
* The methods we must implement.
*/
- protected Collection methods = new HashSet();
+ protected Collection<AbstractMethodGenerator> methods =
+ new HashSet<AbstractMethodGenerator>();
/**
* The map of all code generator variables.
* @param remote
* the class to compile.
*/
- public synchronized void compile(Class remote)
+ public synchronized void compile(Class<?> remote)
{
reset();
String s;
+ implName);
// Get the implemented remotes.
- Class[] interfaces = remote.getInterfaces();
+ Class<?>[] interfaces = remote.getInterfaces();
for (int i = 0; i < interfaces.length; i++)
{
vars.put("#idList", getIdList(implementedRemotes));
// Collect and process methods.
- Iterator iter = implementedRemotes.iterator();
+ Iterator<Class<?>> iter = implementedRemotes.iterator();
while (iter.hasNext())
{
- Class c = (Class) iter.next();
+ Class<?> c = iter.next();
Method[] m = c.getMethods();
// Check if throws RemoteException.
* the interface, for that the repository Id must be created.
* @return the repository id
*/
- public String getId(Class c)
+ public String getId(Class<?> c)
{
return "RMI:" + c.getName() + ":0000000000000000";
}
* the collection of interfaces
* @return the fully formatted string array.
*/
- public String getIdList(Collection remotes)
+ public String getIdList(Collection<Class<?>> remotes)
{
StringBuilder b = new StringBuilder();
// Keep the Ids sorted, ensuring, that the same order will be preserved
// between compilations.
- TreeSet sortedIds = new TreeSet();
+ TreeSet<String> sortedIds = new TreeSet<String>();
- Iterator iter = remotes.iterator();
+ Iterator<Class<?>> iter = remotes.iterator();
while (iter.hasNext())
{
- sortedIds.add(getId((Class) iter.next()));
+ sortedIds.add(getId(iter.next()));
}
- iter = sortedIds.iterator();
- while (iter.hasNext())
+ Iterator<String> iterIds = sortedIds.iterator();
+ while (iterIds.hasNext())
{
- b.append(" \"" + iter.next() + "\"");
- if (iter.hasNext())
+ b.append(" \"" + iterIds.next() + "\"");
+ if (iterIds.hasNext())
b.append(", \n");
}
return b.toString();
// Generate methods.
StringBuilder b = new StringBuilder();
- Iterator iter = methods.iterator();
+ Iterator<AbstractMethodGenerator> iter = methods.iterator();
while (iter.hasNext())
{
- AbstractMethodGenerator m = (AbstractMethodGenerator) iter.next();
+ AbstractMethodGenerator m = iter.next();
b.append(m.generateStubMethod());
}
HashFinder hashFinder = new HashFinder();
// Find the hash character position:
- Iterator iter = methods.iterator();
+ Iterator<AbstractMethodGenerator> iter = methods.iterator();
String[] names = new String[methods.size()];
int p = 0;
vars.put("#hashCharPos", Integer.toString(hashCharPosition));
- ArrayList sortedMethods = new ArrayList(methods);
+ ArrayList<AbstractMethodGenerator> sortedMethods =
+ new ArrayList<AbstractMethodGenerator>(methods);
Collections.sort(sortedMethods, this);
iter = sortedMethods.iterator();
return output;
}
- public int compare(Object a, Object b)
+ public int compare(AbstractMethodGenerator ag1, AbstractMethodGenerator ag2)
{
- MethodGenerator g1 = (MethodGenerator) a;
- MethodGenerator g2 = (MethodGenerator) b;
+ MethodGenerator g1 = (MethodGenerator) ag1;
+ MethodGenerator g2 = (MethodGenerator) ag2;
return g1.getHashChar() - g2.getHashChar();
}
*/
protected String getImportStatements()
{
- TreeSet imp = new TreeSet();
+ TreeSet<String> imp = new TreeSet<String>();
- Iterator it = extraImports.iterator();
+ Iterator<String> it = extraImports.iterator();
while (it.hasNext())
{
- String ic = it.next().toString();
+ String ic = it.next();
imp.add("import " + ic + ";\n");
}
/* Variables.java --
- Copyright (c) 2004, 2005
- Free Software Foundation, Inc.
+ Copyright (c) 2004, 2005, 2012 Free Software Foundation, Inc.
This file is part of GNU Classpath.
class Variables
{
- private final HashSet free = new HashSet();
- private final HashMap names = new HashMap();
- private final HashSet wides = new HashSet();
- private final HashSet declared = new HashSet();
+ private final HashSet<Integer> free = new HashSet<Integer>();
+ private final HashMap<Object,Integer> names = new HashMap<Object,Integer>();
+ private final HashSet<Object> wides = new HashSet<Object>();
+ private final HashSet<Object> declared = new HashSet<Object>();
private boolean allocated = false;
public void declare(Object name)
{
// total allocation size is first unallocated slot
int i = free.size() + names.size() + wides.size();
- names.put(name, new Integer(i));
+ names.put(name, Integer.valueOf(i));
if (size == 2) wides.add(name);
return i;
}
if (size == 2)
{
// look for consecutive free slots
- for (Iterator it = free.iterator(); it.hasNext(); )
+ for (Iterator<Integer> it = free.iterator(); it.hasNext(); )
{
- Integer i = (Integer) it.next();
- Integer next = new Integer(i.intValue() + 1);
+ Integer i = it.next();
+ Integer next = Integer.valueOf(i.intValue() + 1);
if (free.contains(next))
{
free.remove(i);
}
else if (free.size() > 0)
{
- Integer i = (Integer) free.iterator().next();
+ Integer i = free.iterator().next();
free.remove(i);
names.put(name, i);
return i.intValue();
if (declared.contains(name))
throw new IllegalStateException(name + " can't be deallocated");
- Integer i = (Integer) names.get(name);
+ Integer i = names.get(name);
names.remove(name);
free.add(i);
if (wides.remove(name))
- free.add(new Integer(i.intValue() + 1));
+ free.add(Integer.valueOf(i.intValue() + 1));
return i.intValue();
}
if (! names.containsKey(name))
throw new IllegalArgumentException("no variable " + name);
- return ((Integer) names.get(name)).intValue();
+ return names.get(name).intValue();
}
}
Corporation, Norman Walsh, and the Organization for the Advancement
of Structured Information Standards (OASIS).
- $Id: dbcentx.mod,v 1.1 2008/05/27 19:26:05 jsumali Exp $
+ $Id: dbcentx.mod,v 1.1 2008-05-27 19:26:05 jsumali Exp $
Permission to use, copy, modify and distribute the DocBook XML DTD
and its accompanying documentation for any purpose and without fee
<!-- Copyright (C) 2001, 2002 Organization for the Advancement of Structured
Information Standards (OASIS).
- $Id: iso-amsa.ent,v 1.1 2008/05/27 19:26:06 jsumali Exp $
+ $Id: iso-amsa.ent,v 1.1 2008-05-27 19:26:06 jsumali Exp $
Permission to use, copy, modify and distribute this entity set
and its accompanying documentation for any purpose and without
<!-- Copyright (C) 2001, 2002 Organization for the Advancement of Structured
Information Standards (OASIS).
- $Id: iso-amsb.ent,v 1.1 2008/05/27 19:26:06 jsumali Exp $
+ $Id: iso-amsb.ent,v 1.1 2008-05-27 19:26:06 jsumali Exp $
Permission to use, copy, modify and distribute this entity set
and its accompanying documentation for any purpose and without
<!-- Copyright (C) 2001, 2002 Organization for the Advancement of Structured
Information Standards (OASIS).
- $Id: iso-amsc.ent,v 1.1 2008/05/27 19:26:06 jsumali Exp $
+ $Id: iso-amsc.ent,v 1.1 2008-05-27 19:26:06 jsumali Exp $
Permission to use, copy, modify and distribute this entity set
and its accompanying documentation for any purpose and without
<!-- Copyright (C) 2001, 2002 Organization for the Advancement of Structured
Information Standards (OASIS).
- $Id: iso-amsn.ent,v 1.1 2008/05/27 19:26:06 jsumali Exp $
+ $Id: iso-amsn.ent,v 1.1 2008-05-27 19:26:06 jsumali Exp $
Permission to use, copy, modify and distribute this entity set
and its accompanying documentation for any purpose and without
<!-- Copyright (C) 2001, 2002 Organization for the Advancement of Structured
Information Standards (OASIS).
- $Id: iso-amso.ent,v 1.1 2008/05/27 19:26:06 jsumali Exp $
+ $Id: iso-amso.ent,v 1.1 2008-05-27 19:26:06 jsumali Exp $
Permission to use, copy, modify and distribute this entity set
and its accompanying documentation for any purpose and without
<!-- Copyright (C) 2001, 2002 Organization for the Advancement of Structured
Information Standards (OASIS).
- $Id: iso-amsr.ent,v 1.1 2008/05/27 19:26:06 jsumali Exp $
+ $Id: iso-amsr.ent,v 1.1 2008-05-27 19:26:06 jsumali Exp $
Permission to use, copy, modify and distribute this entity set
and its accompanying documentation for any purpose and without
<!-- Copyright (C) 2001, 2002 Organization for the Advancement of Structured
Information Standards (OASIS).
- $Id: iso-box.ent,v 1.1 2008/05/27 19:26:06 jsumali Exp $
+ $Id: iso-box.ent,v 1.1 2008-05-27 19:26:06 jsumali Exp $
Permission to use, copy, modify and distribute this entity set
and its accompanying documentation for any purpose and without
<!-- Copyright (C) 2001, 2002 Organization for the Advancement of Structured
Information Standards (OASIS).
- $Id: iso-cyr1.ent,v 1.1 2008/05/27 19:26:06 jsumali Exp $
+ $Id: iso-cyr1.ent,v 1.1 2008-05-27 19:26:06 jsumali Exp $
Permission to use, copy, modify and distribute this entity set
and its accompanying documentation for any purpose and without
<!-- Copyright (C) 2001, 2002 Organization for the Advancement of Structured
Information Standards (OASIS).
- $Id: iso-cyr2.ent,v 1.1 2008/05/27 19:26:07 jsumali Exp $
+ $Id: iso-cyr2.ent,v 1.1 2008-05-27 19:26:07 jsumali Exp $
Permission to use, copy, modify and distribute this entity set
and its accompanying documentation for any purpose and without
<!-- Copyright (C) 2001, 2002 Organization for the Advancement of Structured
Information Standards (OASIS).
- $Id: iso-dia.ent,v 1.1 2008/05/27 19:26:07 jsumali Exp $
+ $Id: iso-dia.ent,v 1.1 2008-05-27 19:26:07 jsumali Exp $
Permission to use, copy, modify and distribute this entity set
and its accompanying documentation for any purpose and without
<!-- Copyright (C) 2001, 2002 Organization for the Advancement of Structured
Information Standards (OASIS).
- $Id: iso-grk1.ent,v 1.1 2008/05/27 19:26:07 jsumali Exp $
+ $Id: iso-grk1.ent,v 1.1 2008-05-27 19:26:07 jsumali Exp $
Permission to use, copy, modify and distribute this entity set
and its accompanying documentation for any purpose and without
<!-- Copyright (C) 2001, 2002 Organization for the Advancement of Structured
Information Standards (OASIS).
- $Id: iso-grk2.ent,v 1.1 2008/05/27 19:26:07 jsumali Exp $
+ $Id: iso-grk2.ent,v 1.1 2008-05-27 19:26:07 jsumali Exp $
Permission to use, copy, modify and distribute this entity set
and its accompanying documentation for any purpose and without
<!-- Copyright (C) 2001, 2002 Organization for the Advancement of Structured
Information Standards (OASIS).
- $Id: iso-grk3.ent,v 1.1 2008/05/27 19:26:07 jsumali Exp $
+ $Id: iso-grk3.ent,v 1.1 2008-05-27 19:26:07 jsumali Exp $
Permission to use, copy, modify and distribute this entity set
and its accompanying documentation for any purpose and without
<!-- Copyright (C) 2001, 2002 Organization for the Advancement of Structured
Information Standards (OASIS).
- $Id: iso-grk4.ent,v 1.1 2008/05/27 19:26:07 jsumali Exp $
+ $Id: iso-grk4.ent,v 1.1 2008-05-27 19:26:07 jsumali Exp $
Permission to use, copy, modify and distribute this entity set
and its accompanying documentation for any purpose and without
<!-- Copyright (C) 2001, 2002 Organization for the Advancement of Structured
Information Standards (OASIS).
- $Id: iso-lat1.ent,v 1.1 2008/05/27 19:26:07 jsumali Exp $
+ $Id: iso-lat1.ent,v 1.1 2008-05-27 19:26:07 jsumali Exp $
Permission to use, copy, modify and distribute this entity set
and its accompanying documentation for any purpose and without
<!-- Copyright (C) 2001, 2002 Organization for the Advancement of Structured
Information Standards (OASIS).
- $Id: iso-lat2.ent,v 1.1 2008/05/27 19:26:07 jsumali Exp $
+ $Id: iso-lat2.ent,v 1.1 2008-05-27 19:26:07 jsumali Exp $
Permission to use, copy, modify and distribute this entity set
and its accompanying documentation for any purpose and without
<!-- Copyright (C) 2001, 2002 Organization for the Advancement of Structured
Information Standards (OASIS).
- $Id: iso-num.ent,v 1.1 2008/05/27 19:26:07 jsumali Exp $
+ $Id: iso-num.ent,v 1.1 2008-05-27 19:26:07 jsumali Exp $
Permission to use, copy, modify and distribute this entity set
and its accompanying documentation for any purpose and without
<!-- Copyright (C) 2001, 2002 Organization for the Advancement of Structured
Information Standards (OASIS).
- $Id: iso-pub.ent,v 1.1 2008/05/27 19:26:08 jsumali Exp $
+ $Id: iso-pub.ent,v 1.1 2008-05-27 19:26:08 jsumali Exp $
Permission to use, copy, modify and distribute this entity set
and its accompanying documentation for any purpose and without
<!-- Copyright (C) 2001, 2002 Organization for the Advancement of Structured
Information Standards (OASIS).
- $Id: iso-tech.ent,v 1.1 2008/05/27 19:26:08 jsumali Exp $
+ $Id: iso-tech.ent,v 1.1 2008-05-27 19:26:08 jsumali Exp $
Permission to use, copy, modify and distribute this entity set
and its accompanying documentation for any purpose and without
class ArrayIndexOutOfBoundsException;
class ArrayStoreException;
class AssertionError;
+ class AutoCloseable;
class Boolean;
class Byte;
class CharSequence;
class Process;
class ProcessBuilder;
class Readable;
+ class ReflectiveOperationException;
class Runnable;
class Runtime;
class RuntimeException;
void finalize();
public:
jboolean isValid();
+ void close();
void release();
private:
jboolean __attribute__((aligned(__alignof__( ::java::nio::channels::FileLock)))) valid;
return valid;
}
+ public void close() throws Exception
+ {
+ release();
+ }
+
/**
* Releases the lock if it is still valid. Marks this lock as invalid.
*/
public:
virtual void append(::java::lang::String *);
virtual void append(::java::lang::String *, ::java::text::AttributedCharacterIterator$Attribute *);
- virtual void append(::java::lang::String *, JArray< jint > *, JArray< ::java::util::HashMap * > *);
+ virtual void append(::java::lang::String *, JArray< jint > *, ::java::util::List *);
virtual void append(jchar);
virtual void append(jchar, ::java::text::AttributedCharacterIterator$Attribute *);
virtual void setDefaultAttribute(::java::text::AttributedCharacterIterator$Attribute *);
virtual void sync();
virtual ::gnu::java::lang::CPStringBuilder * getBuffer();
virtual JArray< jint > * getRanges();
- virtual JArray< ::java::util::HashMap * > * getAttributes();
+ virtual ::java::util::List * getAttributes();
private:
::gnu::java::lang::CPStringBuilder * __attribute__((aligned(__alignof__( ::java::lang::Object)))) buffer;
::java::util::ArrayList * ranges;
::java::util::ArrayList * attributes;
- JArray< jint > * a_ranges;
- JArray< ::java::util::HashMap * > * a_attributes;
+ JArray< jint > * aRanges;
+ ::java::util::List * aAttributes;
jint startingRange;
public: // actually package-private
::java::text::AttributedCharacterIterator$Attribute * defaultAttr;
public:
virtual void append(::java::lang::String *) = 0;
virtual void append(::java::lang::String *, ::java::text::AttributedCharacterIterator$Attribute *) = 0;
- virtual void append(::java::lang::String *, JArray< jint > *, JArray< ::java::util::HashMap * > *) = 0;
+ virtual void append(::java::lang::String *, JArray< jint > *, ::java::util::List *) = 0;
virtual void append(jchar) = 0;
virtual void append(jchar, ::java::text::AttributedCharacterIterator$Attribute *) = 0;
virtual void setDefaultAttribute(::java::text::AttributedCharacterIterator$Attribute *) = 0;
public:
FormatCharacterIterator();
- FormatCharacterIterator(::java::lang::String *, JArray< jint > *, JArray< ::java::util::HashMap * > *);
+ FormatCharacterIterator(::java::lang::String *, JArray< jint > *, ::java::util::List *);
virtual ::java::util::Set * getAllAttributeKeys();
virtual ::java::util::Map * getAttributes();
virtual ::java::lang::Object * getAttribute(::java::text::AttributedCharacterIterator$Attribute *);
virtual jchar next();
virtual jchar previous();
virtual jchar setIndex(jint);
- virtual void mergeAttributes(JArray< ::java::util::HashMap * > *, JArray< jint > *);
+ virtual void mergeAttributes(::java::util::List *, JArray< jint > *);
virtual void append(::java::text::AttributedCharacterIterator *);
virtual void append(::java::lang::String *, ::java::util::HashMap *);
virtual void append(::java::lang::String *);
- virtual void addAttributes(::java::util::HashMap *, jint, jint);
+ virtual void addAttributes(::java::util::Map *, jint, jint);
private:
void debug(::java::lang::String *);
void dumpTable();
jint charIndex;
jint attributeIndex;
JArray< jint > * ranges;
- JArray< ::java::util::HashMap * > * attributes;
+ ::java::util::List * attributes;
static const jboolean DEBUG = 0;
public:
static ::java::lang::Class class$;
StringFormatBuffer(::java::lang::StringBuffer *);
virtual void append(::java::lang::String *);
virtual void append(::java::lang::String *, ::java::text::AttributedCharacterIterator$Attribute *);
- virtual void append(::java::lang::String *, JArray< jint > *, JArray< ::java::util::HashMap * > *);
+ virtual void append(::java::lang::String *, JArray< jint > *, ::java::util::List *);
virtual void append(jchar);
virtual void append(jchar, ::java::text::AttributedCharacterIterator$Attribute *);
virtual void setDefaultAttribute(::java::text::AttributedCharacterIterator$Attribute *);
{
public:
- DSSIMidiDeviceProvider$DSSIInfo(::java::lang::String *, ::java::lang::String *, ::java::lang::String *, ::java::lang::String *, ::java::lang::String *, jlong);
+ DSSIMidiDeviceProvider$DSSIInfo(::java::lang::String *, ::java::lang::String *, ::java::lang::String *, ::java::lang::String *, ::java::lang::String *, ::java::lang::String *, jlong);
public: // actually package-private
- ::java::lang::String * __attribute__((aligned(__alignof__( ::javax::sound::midi::MidiDevice$Info)))) soname;
+ ::java::lang::String * __attribute__((aligned(__alignof__( ::javax::sound::midi::MidiDevice$Info)))) copyright;
+ ::java::lang::String * soname;
jlong index;
public:
static ::java::lang::Class class$;
::java::util::Vector * __attribute__((aligned(__alignof__( ::java::lang::Object)))) solids;
::java::util::Vector * holes;
private:
- ::java::util::Vector * cc_intersections;
+ ::java::util::Vector * ccIntersections;
jint windingRule;
public:
static ::java::lang::Class class$;
AssertionError(jlong);
AssertionError(jfloat);
AssertionError(jdouble);
+ AssertionError(::java::lang::String *, ::java::lang::Throwable *);
private:
static const jlong serialVersionUID = -5013299493970297370LL;
public:
--- /dev/null
+
+// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
+
+#ifndef __java_lang_AutoCloseable__
+#define __java_lang_AutoCloseable__
+
+#pragma interface
+
+#include <java/lang/Object.h>
+
+class java::lang::AutoCloseable : public ::java::lang::Object
+{
+
+public:
+ virtual void close() = 0;
+ static ::java::lang::Class class$;
+} __attribute__ ((java_interface));
+
+#endif // __java_lang_AutoCloseable__
jboolean equals(::java::lang::Object *);
static jboolean getBoolean(::java::lang::String *);
jint Boolean$compareTo(::java::lang::Boolean *);
+ static jint compare(jboolean, jboolean);
static jboolean parseBoolean(::java::lang::String *);
jint compareTo(::java::lang::Object *);
private:
jint hashCode();
jboolean equals(::java::lang::Object *);
jint Byte$compareTo(::java::lang::Byte *);
+ static jint compare(jbyte, jbyte);
jint compareTo(::java::lang::Object *);
private:
static const jlong serialVersionUID = -7183698231559129828LL;
#pragma interface
-#include <java/lang/Exception.h>
+#include <java/lang/ReflectiveOperationException.h>
-class java::lang::ClassNotFoundException : public ::java::lang::Exception
+class java::lang::ClassNotFoundException : public ::java::lang::ReflectiveOperationException
{
public:
virtual ::java::lang::Throwable * getCause();
private:
static const jlong serialVersionUID = 9176873029745254542LL;
- ::java::lang::Throwable * __attribute__((aligned(__alignof__( ::java::lang::Exception)))) ex;
+ ::java::lang::Throwable * __attribute__((aligned(__alignof__( ::java::lang::ReflectiveOperationException)))) ex;
public:
static ::java::lang::Class class$;
};
#pragma interface
-#include <java/lang/Exception.h>
+#include <java/lang/ReflectiveOperationException.h>
-class java::lang::IllegalAccessException : public ::java::lang::Exception
+class java::lang::IllegalAccessException : public ::java::lang::ReflectiveOperationException
{
public:
#pragma interface
-#include <java/lang/Exception.h>
+#include <java/lang/ReflectiveOperationException.h>
-class java::lang::InstantiationException : public ::java::lang::Exception
+class java::lang::InstantiationException : public ::java::lang::ReflectiveOperationException
{
public:
static ::java::lang::Integer * getInteger(::java::lang::String *, ::java::lang::Integer *);
static ::java::lang::Integer * decode(::java::lang::String *);
jint Integer$compareTo(::java::lang::Integer *);
+ static jint compare(jint, jint);
static jint bitCount(jint);
static jint rotateLeft(jint, jint);
static jint rotateRight(jint, jint);
public:
LinkageError();
LinkageError(::java::lang::String *);
+ LinkageError(::java::lang::String *, ::java::lang::Throwable *);
private:
static const jlong serialVersionUID = 3579600108157160122LL;
public:
static ::java::lang::Long * getLong(::java::lang::String *, jlong);
static ::java::lang::Long * getLong(::java::lang::String *, ::java::lang::Long *);
jint Long$compareTo(::java::lang::Long *);
+ static jint compare(jlong, jlong);
static jint bitCount(jlong);
static jlong rotateLeft(jlong, jint);
static jlong rotateRight(jlong, jint);
#pragma interface
-#include <java/lang/Exception.h>
+#include <java/lang/ReflectiveOperationException.h>
-class java::lang::NoSuchFieldException : public ::java::lang::Exception
+class java::lang::NoSuchFieldException : public ::java::lang::ReflectiveOperationException
{
public:
#pragma interface
-#include <java/lang/Exception.h>
+#include <java/lang/ReflectiveOperationException.h>
-class java::lang::NoSuchMethodException : public ::java::lang::Exception
+class java::lang::NoSuchMethodException : public ::java::lang::ReflectiveOperationException
{
public:
--- /dev/null
+
+// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
+
+#ifndef __java_lang_ReflectiveOperationException__
+#define __java_lang_ReflectiveOperationException__
+
+#pragma interface
+
+#include <java/lang/Exception.h>
+
+class java::lang::ReflectiveOperationException : public ::java::lang::Exception
+{
+
+public:
+ ReflectiveOperationException();
+ ReflectiveOperationException(::java::lang::String *);
+ ReflectiveOperationException(::java::lang::String *, ::java::lang::Throwable *);
+ ReflectiveOperationException(::java::lang::Throwable *);
+private:
+ static const jlong serialVersionUID = 123456789LL;
+public:
+ static ::java::lang::Class class$;
+};
+
+#endif // __java_lang_ReflectiveOperationException__
jint hashCode();
jboolean equals(::java::lang::Object *);
jint Short$compareTo(::java::lang::Short *);
+ static jint compare(jshort, jshort);
static jshort reverseBytes(jshort);
jint compareTo(::java::lang::Object *);
private:
#pragma interface
-#include <java/lang/Exception.h>
+#include <java/lang/ReflectiveOperationException.h>
-class java::lang::reflect::InvocationTargetException : public ::java::lang::Exception
+class java::lang::reflect::InvocationTargetException : public ::java::lang::ReflectiveOperationException
{
public: // actually protected
virtual ::java::lang::Throwable * getCause();
private:
static const jlong serialVersionUID = 4085088731926701167LL;
- ::java::lang::Throwable * __attribute__((aligned(__alignof__( ::java::lang::Exception)))) target;
+ ::java::lang::Throwable * __attribute__((aligned(__alignof__( ::java::lang::ReflectiveOperationException)))) target;
public:
static ::java::lang::Class class$;
};
virtual jlong position();
virtual jlong size();
virtual ::java::lang::String * toString();
+ virtual void close() = 0;
private:
::java::nio::channels::FileChannel * __attribute__((aligned(__alignof__( ::java::lang::Object)))) channel__;
jlong position__;
jint index;
jint textIndex;
private:
- JArray< ::java::text::RuleBasedCollator$CollationElement * > * text_decomposition;
- JArray< jint > * text_indexes;
+ JArray< ::java::text::RuleBasedCollator$CollationElement * > * textDecomposition;
+ JArray< jint > * textIndexes;
public:
static ::java::lang::Class class$;
};
--- /dev/null
+
+// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
+
+#ifndef __java_text_DateFormatSymbols$DFSData__
+#define __java_text_DateFormatSymbols$DFSData__
+
+#pragma interface
+
+#include <java/lang/Object.h>
+#include <gcj/array.h>
+
+extern "Java"
+{
+ namespace java
+ {
+ namespace text
+ {
+ class DateFormatSymbols$DFSData;
+ }
+ }
+}
+
+class java::text::DateFormatSymbols$DFSData : public ::java::lang::Object
+{
+
+public:
+ DateFormatSymbols$DFSData(JArray< ::java::lang::String * > *, JArray< ::java::lang::String * > *, ::java::lang::String *, JArray< ::java::lang::String * > *, JArray< ::java::lang::String * > *, JArray< ::java::lang::String * > *, JArray< ::java::lang::String * > *, JArray< ::java::lang::String * > *, JArray< ::java::lang::String * > *, JArray< JArray< ::java::lang::String * > * > *);
+ virtual JArray< ::java::lang::String * > * getAMPMs();
+ virtual JArray< ::java::lang::String * > * getEras();
+ virtual ::java::lang::String * getLocalPatternChars();
+ virtual JArray< ::java::lang::String * > * getMonths();
+ virtual JArray< ::java::lang::String * > * getShortMonths();
+ virtual JArray< ::java::lang::String * > * getWeekdays();
+ virtual JArray< ::java::lang::String * > * getShortWeekdays();
+ virtual JArray< ::java::lang::String * > * getDateFormats();
+ virtual JArray< ::java::lang::String * > * getTimeFormats();
+ virtual JArray< JArray< ::java::lang::String * > * > * getZoneStrings();
+private:
+ JArray< ::java::lang::String * > * __attribute__((aligned(__alignof__( ::java::lang::Object)))) ampms;
+ JArray< ::java::lang::String * > * eras;
+ ::java::lang::String * localPatternChars;
+ JArray< ::java::lang::String * > * months;
+ JArray< ::java::lang::String * > * shortMonths;
+ JArray< ::java::lang::String * > * weekdays;
+ JArray< ::java::lang::String * > * shortWeekdays;
+ JArray< ::java::lang::String * > * dateFormats;
+ JArray< ::java::lang::String * > * timeFormats;
+ JArray< JArray< ::java::lang::String * > * > * runtimeZoneStrings;
+public:
+ static ::java::lang::Class class$;
+};
+
+#endif // __java_text_DateFormatSymbols$DFSData__
namespace text
{
class DateFormatSymbols;
+ class DateFormatSymbols$DFSData;
}
}
}
static JArray< ::java::lang::String * > * getStringArray(::java::util::List *, ::java::lang::String *, jint);
static JArray< ::java::lang::String * > * getStringArray(::java::util::List *, ::java::lang::String *, jint, JArray< ::java::lang::String * > *);
- JArray< JArray< ::java::lang::String * > * > * getZoneStrings(::java::util::ResourceBundle *, ::java::util::Locale *);
- JArray< ::java::lang::String * > * formatsForKey(::java::util::ResourceBundle *, ::java::lang::String *);
+ static JArray< JArray< ::java::lang::String * > * > * getZoneStrings(::java::util::List *, ::java::util::Locale *);
+ static JArray< ::java::lang::String * > * formatsForKey(::java::util::List *, ::java::lang::String *);
+ static ::java::lang::String * getString(::java::util::List *, ::java::lang::String *);
+ static ::java::text::DateFormatSymbols$DFSData * retrieveData(::java::util::Locale *);
public:
DateFormatSymbols(::java::util::Locale *);
DateFormatSymbols();
virtual jint hashCode();
static ::java::text::DateFormatSymbols * getInstance();
static ::java::text::DateFormatSymbols * getInstance(::java::util::Locale *);
+private:
+ static ::java::util::Properties * properties;
+ static ::java::util::regex::Pattern * ZONE_SEP;
+ static ::java::util::regex::Pattern * FIELD_SEP;
+ static ::java::util::concurrent::ConcurrentMap * dataCache;
public: // actually package-private
JArray< ::java::lang::String * > * __attribute__((aligned(__alignof__( ::java::lang::Object)))) ampms;
JArray< ::java::lang::String * > * eras;
JArray< ::java::lang::String * > * shortWeekdays;
JArray< ::java::lang::String * > * weekdays;
private:
- static ::java::util::Properties * properties;
JArray< JArray< ::java::lang::String * > * > * runtimeZoneStrings;
JArray< JArray< ::java::lang::String * > * > * zoneStrings;
static const jlong serialVersionUID = -5987973545549424702LL;
public: // actually package-private
TimeZone$1();
public:
+ virtual ::java::util::TimeZone * TimeZone$1$run();
virtual ::java::lang::Object * run();
static ::java::lang::Class class$;
};
public: // actually package-private
Matcher(::java::util::regex::Pattern *, ::java::lang::CharSequence *);
public:
+ ::java::util::regex::Matcher * usePattern(::java::util::regex::Pattern *);
::java::util::regex::Matcher * appendReplacement(::java::lang::StringBuffer *, ::java::lang::String *);
::java::lang::StringBuffer * appendTail(::java::lang::StringBuffer *);
jint end();
static ::java::lang::String * POLICY_FORWARD_SECRECY;
static ::java::lang::String * POLICY_PASS_CREDENTIALS;
static ::java::lang::String * REUSE;
+ static ::java::lang::String * CREDENTIALS;
private:
static ::java::lang::String * CLIENT_FACTORY_SVC;
static ::java::lang::String * SERVER_FACTORY_SVC;
classpath/java/lang/ArrayIndexOutOfBoundsException.java \
classpath/java/lang/ArrayStoreException.java \
classpath/java/lang/AssertionError.java \
+classpath/java/lang/AutoCloseable.java \
classpath/java/lang/Boolean.java \
classpath/java/lang/Byte.java \
classpath/java/lang/CharSequence.java \
classpath/java/lang/Process.java \
classpath/java/lang/ProcessBuilder.java \
classpath/java/lang/Readable.java \
+classpath/java/lang/ReflectiveOperationException.java \
classpath/java/lang/Runnable.java \
java/lang/Runtime.java \
classpath/java/lang/RuntimeException.java \