2003-03-10 2003-02-27 Mohan Embar <gnustuff@thisiscool.com>
* include/jvm.h: removed declaration of _Jv_ThisExecutable()
setter; made return value of getter const char* instead of char*
* prims.cc: removed all references to _Jv_ThisExecutable().
These are in the platform-specific sections now.
* posix.cc: define platform-specific _Jv_ThisExecutable().
Handle DISABLE_MAIN_ARGS and HAVE_PROC_SELF_EXE cases
* win32.cc: define platform-specific _Jv_ThisExecutable()
using GetModuleFilename()
* java/lang/natRuntime.cc: set gnu.gcj.progname property
to argv[0] instead of _Jv_ThisExecutable()
2003-03-10 Ranjit Mathew <rmathew@hotmail.com>
* gnu/gcj/runtime/NameFinder.java (usingAddr2name): New flag
that is set if we are using addr2name.awk instead of addr2line.
(NameFinder): Set usingAddr2name if using addr2name.awk.
(getExternalLabel): New native method to convert a method
name to an external label.
(lookup): Convert name given by addr2line to an external label
before demangling.
* gnu/gcj/runtime/natNameFinder.cc (LABEL_PREFIX): New string
constant representing the prefix attached to method names to
convert them to an external label.
(gnu::gcj::runtime::NameFinder::getExternalLabel): Define
using LABEL_PREFIX.
From-SVN: r64111
2003-03-10 Michael Koch <konqueror@gmx.de>
* java/net/DatagramSocket.java,
java/net/MulticastSocket.java,
java/net/Socket.java,
java/net/URL.java,
java/net/URLConnection.java:
Fixed some documentation tags to make javadoc and friends happy.
From-SVN: r64083
* java/awt/FocusTraversalPolicy.java
(FocusTraversalPolicy): Documentation added.
(getComponentAfter): Documentation added.
(getComponentBefore): Documentation added.
(getFirstComponent): Documentation added.
(getLastComponent): Documentation added.
(getDefaultComponent): Documentation added.
(getInitialComponent): Documentation added.
* java/awt/ScrollPaneAdjustable.java
(sp): New member variable.
(orientation): New member variable.
(value): New member variable.
(minimum): New member variable.
(maximum): New member variable.
(visibleAmount): New member variable.
(unitIncrement): New member variable.
(blockIncrement): New member variable.
(adjustmentListener): New member variable.
(ScrollPaneAdjustable): Rewrote.
(addAdjustmentListener): New method.
(removeAdjustmentListener): New method.
(getAdjustmentListeners): New method.
(getBlockIncrement): New method.
(getMaximum): New method.
(getMinimum): New method.
(getOrientation): New method.
(getUnitIncrement): New method.
(getValue): New method.
(getVisibleAmount): New method.
(setBlockIncrement): New method.
(setUnitIncrement): New method.
(setMaximum): Implemented.
(setMinimum): Implemented.
(setValue): New method.
(setVisibleAmount): Implemented.
(paramString): New method.
* java/awt/Window.java
(show): Use setVisible(true) instead of super.show().
(hide): Use sevVisible(false) instead of super.hide().
(processWindowEvent): Added cases for WINDOW_GAINED_FOCUS,
WINDOW_LOST_FOCUS and WINDOW_STATE_CHANGED.
(postEvent): Deprecated.
(applyResourceBundle): Deprecated.
(processWindowFocusEvent): New method.
(processWindowStateEvent): New method.
* java/awt/datatransfer/DataFlavor.java: Reindented.
* java/awt/font/TextHitInfo.java
(charIndex): New member variable.
(leadingEdge): New member variable.
(TextHitInfo): New constructor.
(getCharIndex): Implemented.
(isLeadingEdge): Implemented.
(getInsertionIndex): Implemented.
(hashCode): Access charIndex directly.
(equals): Reformated.
(leading): Implemented.
(trailing): Implemented.
(beforeOffset): Implemented.
(afterOffset): Implemented.
(getOtherHit): Implemented.
(getOffsetHit): Implemented.
(toString): Implemented.
* java/awt/image/BufferedImage.java
(BufferedImage): Implements WritableRenderedImage.
(observers): New member variable.
(addTileObserver): New method.
(removeTileObserver): New method.
From-SVN: r64078
2003-03-02 Michael Koch <konqueror@gmx.de>
* java/awt/dnd/DnDEventMulticaster.java: New file.
* java/awt/dnd/DragSource.java
(flavorMap): New member variable.
(dragSourceListener): New member variable.
(dragSourceMotionListener): New member variable.
(getFlavorMap): Implemented.
(createDragGestureRecognizer): Implemented.
(addDragSourceListener): Implemented.
(removeDragSourceListener): Implemented.
(getDragSourceListeners): Implemented.
(addDragSourceMotionListener): Implemented.
(removeDragSourceMotionListener): Implemented.
(getDragSourceMotionListeners): Implemented.
(getListeners): Implemented.
* java/awt/dnd/DragSourceContext.java
(peer): New member variable.
(cursor): New member variable.
(transferable): New member variable.
(trigger): New member variable.
(dragSourceListener): New member variable.
(image): New member variable.
(offset): New member variable.
(DragSourceContext): Implemented.
(getDragSource): Implemented.
(getComponent): Implemented.
(getTrigger): Implemented.
(getSourceActions): Implemented.
(setCursor): Implemented.
(getCursor): Implemented.
(addDragSourceListener): Implemented.
(removeDragSourceListener): Implemented.
(getTransferable): Implemented.
* java/awt/dnd/DropTarget.java
(DropTargetAutoScroller.component): New member variable.
(DropTargetAutoScroller.point): New member variable.
(DropTargetAutoScroller.DropTargetAutoScroller): Implemented.
(DropTargetAutoScroller.updateLocation): Implemented.
(active): Renamed from isActive, defaults to true now.
(component): New member variable.
(flavorMap): New member variable.
(actions): New member variable.
(dropTargetContext): New member variable.
(dropTargetListener): New member variable.
(DropTarget): Implemented.
(getComponent): Implemented.
(setComponent): Implemented.
(setDefaultActions): Implemented.
(getDefaultActions): Implemented.
(setActive): Use active instead of isActive.
(isActive): Use active instead of isActive.
(addDropTargetListener): Implemented.
(removeDropTargetListener): Implemented.
(getFlavorMap): Implemented.
(setFlavorMap): Implemented.
(getDropTargetContext): Implemented.
(createDropTargetContext): Implemented.
(createDropTargetAutoScroller): Implemented.
* java/awt/dnd/DropTargetContext.java
(TransferableProxy.getTransferDataFlavors): Implemented.
(TransferableProxy.isDataFlavorSupported): Implemented.
(TransferableProxy.getTransferData): Implemented.
(dropTarget): New member variable.
(dtcp): New member variable.
(DropTargetContext): New package private constructor.
(getDropTarget): Implemented.
(getComponent): Implemented.
(addNotify): Implemented.
(removeNotify): Implemented.
(getCurrentDataFlavorsAsList): Implemented.
(isDataFlavorSupported): Implemented.
* java/awt/dnd/MouseDragGestureRecognizer.java
(registerListeners): Implemented.
(unregisterListeners): Implemented.
* Makefile.am
(awt_java_source_files): Added java/awt/dnd/DnDEventMulticaster.java.
* Makefile.in: Regenerated.
From-SVN: r63665
* java/net/DatagramSocket.java
(closed): New member variable.
(close): Use closed variable.
(getInetAddress): No need to call isConnected().
(getPort): No need to call isConnected().
(disconnect): Reset remoteAddress and remotePort, fixed typo.
(isClosed): Reimplemented.
From-SVN: r63662
2003-03-01 Ranjit Mathew <rmathew@hotmail.com>
* java/io/File.java (normalizePath): Remove trailing separator
on Windows only if path is not of the form "x:\".
* java/io/natFileWin32.cc (WIN32_EPOCH_MILLIS): New constant.
(java::io::File::attr): Change formatting a bit and use
WIN32_EPOCH_MILLIS instead of magic numbers.
(java::io::File::isAbsolute): Path must have at least 3
characters for a UNC network path.
(java::io::File::init_native): Define.
(java::io::File::performCreate): Likewise.
(java::io::File::performSetReadOnly): Likewise.
(java::io::File::performSetLastModified): Likewise.
(java::io::File::performListRoots): Likewise.
From-SVN: r63646
2003-03-01 Ranjit Mathew <rmathew@hotmail.com>
* java/io/File (getAbsolutePath): Prefix drive specifier on
Windows for paths starting with a '\'.
(toURL): Make URL more consistent with what Sun's JDK returns.
* java/io/natFileWin32.cc (java::io::File::isAbsolute): Return
true only if the path is a UNC network path or it starts with a
drive specifier.
* java/net/URLStreamHandler.java (parseURL): Correct minor typo.
Be prepared to handle either '/' or '\\' in the file path for
Windows if using the "file" protocol.
Canonicalise the file path if using a relative path in the given
context and the "file" protocol.
From-SVN: r63635
2003-03-01 Mohan Embar <gnustuff@thisiscool.com>
* java/lang/natWin32Process.cc (startProcess): Double-quote each
program array element passed to CreateProcess.
From-SVN: r63633
* java/lang/reflect/natMethod.cc (_Jv_CallAnyMethodA): Allocate a full
jvalue for each argument. Simplify.
* testsuite/libjava.jni/calls.c (docall),
testsuite/libjava.jni/calls.java (longpb_f): check for argument
misalignment.
From-SVN: r63563
* Makefile.am (nat_source_files): Remove
java/io/natObjectOutputStream.cc.
* Makefile.in: Regenerated.
* mauve-libgcj: Don't exclude java.io.ObjectInputOutput tests.
* java/io/ObjectStreamField.java (typename): New field.
(ObjectStreamField(String, Class)): Initialize new field.
(ObjectStreamField(String, String)): New Constructor.
(getTypeCode): Use new field.
(getTypeString): Use new field.
* java/io/ObjectOutputStream.java (writeObject): Rethrow fatal
ObjectStreamExceptions. Remember and reset old BlockDataMode.
Handle reading of Proxy classes. Never drain(), just write
TC_ENDBLOCKDATA. Rethrow ObjectStreamExceptions.
(drain): Check writeDataAsBlocks before calling writeBlockDataHeader.
(flush): Call flush(), not just drain().
(writeBoolean): Always use blockDataOutput.
(writeByte): Likewise.
(writeShort): Likewise.
(writeChar): Likewise.
(writeInt): Likewise.
(writeLong): Likewise.
(writeFloat): Likewise.
(writeDouble): Likewise.
(writeBytes): Likewise.
(putfield (put(String,Object))): Throw IllegalArgumentException if
field cannot be found.
(putfield (write(ObjectOutput))): Remember old BlockDataMode.
(writeArraySizeAndElements): Write byte[] in one go.
(writeFields): Write TC_ENDBLOCKDATA when call_write_method, otherwise
set BlockDataMode to false.
(annotateProxyClass): New method.
(defaultProtocolVersion): Now defaults to PROTOCOL_VERSION_2
(getField): No longer native.
(getMethod): Likewise.
(setBlockDataMode): Always drain() on switch, return old mode.
(static): New static code block.
* java/io/natObjectOutputStream.cc: Removed.
* java/io/ObjectInputStream.java (getField): No longer native.
(getMethod): Likewise.
(readObject): Remember and reset old BlockDataMode. Track whether
object is consumed. Handle TC_ENDBLOCKDATA, TC_PROXYCLASSDESC and
TC_LONGSTRING.
(defaultReadObject): Set BlockDataMode to false during readFields.
(resolveClass): Create new SecurityManager if necessary.
Use Class.forName() if null ClassLoader found.
(read(byte[],int,int): Copy remaining bytes to data before calling
readNextBlock().
(readFields): Set and reset BlockDataMode on call_read_method.
Catch NoSuchFieldErrors.
(setBlockDataMode): Return old mode.
(static): New static code block.
* java/io/natObjectInputStream.cc (getField): Removed.
(getMethod): Likewise.
From-SVN: r63556
2003-02-27 Michael Koch <konqueror@gmx.de>
* java/beans/Beans.java,
java/beans/FeatureDescriptor.java
java/beans/PropertyEditorManager.java:
Reformated to GNU style.
From-SVN: r63501
2003-02-20 Raif S. Naffah <raif@fl.net.au>
* java/math/BigInteger.java (euclidInv): Take result array as an
argument. Updated all callers.
(modInverse): Removed unused variables.
From-SVN: r63170
* gnu/java/nio/ByteBufferImpl.java
(ByteBufferImpl): Renamed two variables.
* gnu/java/nio/CharBufferImpl.java
(CharBufferImpl): Renamed two variables.
* gnu/java/nio/DoubleBufferImpl.java
(DoubleBufferImpl): Renamed two variables.
* gnu/java/nio/FloatBufferImpl.java
(FloatBufferImpl): Renamed two variables.
* gnu/java/nio/IntBufferImpl.java
(IntBufferImpl): Renamed two variables.
* gnu/java/nio/LongBufferImpl.java
(LongBufferImpl): Renamed two variables.
* gnu/java/nio/ShortBufferImpl.java
(ShortBufferImpl): Renamed two variables.
* java/nio/CharBuffer.java
(wrap): Fixed arguments to CharBufferImpl constructor.
(hasArray): Only not read-only buffers have backing arrays.
(length): Documentation added.
(subSequence): Documentation added.
* java/nio/DoubleBuffer.java
(hasArray): Only not read-only buffers have backing arrays.
* java/nio/FloatBuffer.java
(hasArray): Only not read-only buffers have backing arrays.
* java/nio/IntBuffer.java
(hasArray): Only not read-only buffers have backing arrays.
* java/nio/LongBuffer.java
(hasArray): Only not read-only buffers have backing arrays.
* java/nio/ShortBuffer.java
(hasArray): Only not read-only buffers have backing arrays.
From-SVN: r63101
* gnu/awt/j2d/Graphics2DImpl.java
(getFontRenderContext): New method.
(drawGlyphVector): New method.
* java/awt/Graphics2D.java
(getFontRenderContext): New abstract method.
(drawGlyphVector): New abstract method.
From-SVN: r63097
2003-02-18 Hans Boehm <Hans.Boehm@hp.com>
* gnu/awt/xlib/XToolkit.java (getFontMetrics): initialize
if necessary.
* gnu/java/awt/peer/gtk/GtkButtonPeer.java,
gnu/java/awt/peer/gtk/GtkTextAreaPeer.java,
gnu/java/awt/peer/gtk/GtkTextFieldPeer.java,
jni/gtk-peer/gnu_java_awt_peer_gtk_GtkButtonPeer.c,
jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c,
jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextFieldPeer.c
(setFont, gtkSetFont): add.
gnu/java/awt/peer/gtk/GtkComponentPeer.java (GtkComponentPeer):
Propagate font to peer. (setFont): add FIXME comment.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkTextAreaPeer.c
(gtkTextGetSize): fix height, width computation.
* gnu/java/awt/peer/gtk/GtkFontPeer.java (GtkFontPeer):
Make X font name a bit less bogus.
* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkScrollBarPeer.c
(post_adjustment_event): Pass on GTK_SCROLL_NONE.
* java/awt/Scrollbar.java (setValues): Fix visibleAmount range check.
(processAdjustmentEvent): Adjust value.
* java/awt/FlowLayout.java (layoutContainer) Fix 2 indexing and one
logic errors.
* java/awt/Component.java (setVisible, show, hide): Call show and
hide methods in subclasses.
(getPreferredSize): don't set prefSize before we have peer.
* java/awt/TextArea.java, java/awt/TextField.java (getPreferredSize):
Guess (0,0) if we don't have peer.
From-SVN: r63077
2003-02-17 Ranjit Mathew <rmathew@hotmail.com>
* java/util/Properties.java (store): Move the code formerly in
list(), into this method.
(list (PrintStream)): Just call list (PrintWriter) with a
PrintWriter object constructed from the given PrintStream object.
(list (PrintWriter)): Emulate the output of Properties.list()
as found in JDK 1.3/1.4.
From-SVN: r63006