Commit Graph

863 Commits

Author SHA1 Message Date
Tom Tromey d0815622ea martin.out: New file.
* libjava.jni/martin.out: New file.
	* libjava.jni/martin.c: New file.
	* libjava.jni/martin.java: New file.

From-SVN: r39286
2001-01-26 22:41:41 +00:00
Warren Levy 5bb1db008c natSystem.cc (getSystemTimeZone): Only use tm_gmtoff and timezone if they are available on the system.
* java/lang/natSystem.cc (getSystemTimeZone): Only use tm_gmtoff
	and timezone if they are available on the system.

From-SVN: r39283
2001-01-26 21:57:08 +00:00
Tom Tromey f07f528411 * java/lang/sf_fabs.c: Use uint32_t, not __uint32_t.
From-SVN: r39269
2001-01-25 19:07:18 +00:00
Tom Tromey 295504e3a7 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (c_source_files): Added sf_fabs.c.
	* java/lang/sf_fabs.c: New file.

From-SVN: r39238
2001-01-24 17:43:25 +00:00
Warren Levy 1aa605c814 SimpleDateFormat.java (format): Compute hour for cases HOUR_OF_DAY1_FIELD (1-24)...
* java/text/SimpleDateFormat.java (format): Compute hour for cases
	HOUR_OF_DAY1_FIELD (1-24), HOUR1_FIELD (1-12), and HOUR0_FIELD (0-11)
	correctly.  Adjust properly from 0-23 clock hour.

Fixes failure in Mauve test java.text.SimpleDateFormat.Test (format).

From-SVN: r39147
2001-01-20 00:37:09 +00:00
Mark Wielaard d150822e55 * java/bean/Beans.java (instantiate): enable Applet code from Classpath
From-SVN: r39105
2001-01-18 00:43:17 +00:00
Bryce McKinlay 607adf67a0 Class.h (isInterface): Move implementation from natClass.cc.
* java/lang/Class.h (isInterface): Move implementation from
	natClass.cc. Declare inline.
	(Class): Add default constructor.
	* java/lang/Object.h: Update comments.
	* java/lang/natClass.cc (initializeClass): Use _Jv_InitClass to
	initialize superclass, saving a call if super is already initialized.

From-SVN: r39091
2001-01-17 10:22:33 +00:00
Alexandre Petit-Bianco ed8cc5fdf8 prims.cc (init_prim_class): Deleted.
2001-01-16  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	* prims.cc (init_prim_class): Deleted.
	(DECLARE_PRIM_TYPE): Rewritten.
	* java/lang/Class.h (stdio.h): Include removed.
	(stddef.h): Included.
	(java/lang/reflect/Modifier.h): Likewise.
	(Class): Contructor now takes arguments, initializes fields.
	(initializePrim): Prototype deleted.
	* java/lang/natClass.cc (initializePrim): Deleted.

(http://sources.redhat.com/ml/java-patches/2001-q1/msg00081.html)

From-SVN: r39088
2001-01-17 00:13:06 -08:00
Richard Henderson c99a2d3137 libjava.exp (bytecompile_file): Don't unset CLASSPATH.
* lib/libjava.exp (bytecompile_file): Don't unset CLASSPATH.
        (libjava_arguments): Use .jar extension for libgcj.

From-SVN: r39085
2001-01-16 22:45:40 -08:00
Warren Levy 19c976393d * java/math/BigInteger.java: Update Copyright year.
From-SVN: r39082
2001-01-17 04:13:17 +00:00
Hans Boehm c7fb0b9218 BigInteger.java (setShiftRight): Only do negative shift if count != 0.
2001-01-16  Hans Boehm  <hans_boehm@hp.com>

	* java/math/BigInteger.java (setShiftRight): Only do negative shift
	if count != 0.

From-SVN: r39080
2001-01-17 01:00:53 +00:00
Alexandre Petit-Bianco 2feccc205e All files with updated copyright.
2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>

	All files with updated copyright.
	* prims.cc (class _Jv_PrimClass): Removed.
	(init_prim_class): New function.
	(DECLARE_PRIM_TYPE): Rewritten. `java::lang::Class' replaces
	`_Jv_PrimClass' in primitive type declarations. Assign to the
	value returned by `init_prim_class.'
	* gcj/array.h: `java::lang::Class' replaces `_Jv_PrimClass' in
	primitive type declarations.
	(JvPrimClass): Cast to `jclass' removed.
	* java/lang/Class.h (Class): New constructor.
	(Class): New copy constructor.
	(initializePrim): New prototype.
	(_Jv_PrimClass): Field removed.
	* java/lang/Object.h (struct _JvObjectPrefix): New virtuals
	nacd_1 and nacd_2 (for compatibility with the new C++ ABI.)
	(class java::lang::Object): `finalize' moved up front.
	* java/lang/natClass.cc
	(isAssignableFrom): Turned outline.
	(isInstance): Likewise.
	(isInterface): Likewise, fixed indentation.
	(initializePrim): New function.

(New C++ ABI compatibility patch:
 http://sources.redhat.com/ml/java-patches/2001-q1/msg00065.html)

From-SVN: r39032
2001-01-15 00:11:40 -08:00
Mark Wielaard b9333bff58 URLDecoder.java: Thanks Edgar Villanueva (edgarvil@home.com)
* java/net/URLDecoder.java: Thanks Edgar Villanueva (edgarvil@home.com)
   (decode): Merge comments with Classpath, don't throw Exception

From-SVN: r39030
2001-01-15 07:58:16 +00:00
Tom Tromey 706c0c1156 Removed bogus ChangeLog entry
From-SVN: r38969
2001-01-13 00:03:28 +00:00
Tom Tromey fafc249b1b natGtkComponentPeer.cc (getLocationOnScreen): Wrote.
* gnu/awt/gtk/natGtkComponentPeer.cc (getLocationOnScreen):
	Wrote.
	(setCursor): Wrote.
	Include Cursor.h.
	* gnu/awt/gtk/natGtkLabelPeer.cc: New file.
	* gnu/awt/gtk/natGtkButtonPeer.cc: New file.
	* gnu/awt/gtk/gtkcommon.h (class _Jv_GdkThreadLock): New class.
	* gnu/awt/gtk/GtkLabelPeer.java: New file.
	* gnu/awt/gtk/GtkButtonPeer.java: New file.

From-SVN: r38967
2001-01-12 23:08:23 +00:00
Tom Tromey b755792e3c natSystem.cc: Include locale.h if it exists.
* java/lang/natSystem.cc: Include locale.h if it exists.
	* configure: Rebuilt.
	* configure.in: Check for locale.h.

From-SVN: r38957
2001-01-12 19:16:05 +00:00
Tom Tromey c1ef066249 Cursor.java (Cursor(String)): Set type to custom.
* java/awt/Cursor.java (Cursor(String)): Set type to custom.
	(Cursor(int), getPredefinedCursor): Throw exception if argument
	invalid.

From-SVN: r38911
2001-01-11 17:49:47 +00:00
Bryce McKinlay f6d1c49e80 Makefile.am: Re-enable dependencies.
* Makefile.am: Re-enable dependencies.
	* Makefile.in: Rebuilt.

From-SVN: r38890
2001-01-11 02:50:47 +00:00
Warren Levy 737c87df28 * java/math/BigDecimal.java (divide): Fixed comment.
From-SVN: r38862
2001-01-10 10:26:34 +00:00
Warren Levy 698489049d re PR libgcj/1596 (setScale() missing from java.math.BigDecimal)
Fix for PR libgcj/1596:
	* java/math/BigDecimal.java (divide): Check newScale for validity.
	Ensure that BigInteger.pow() is called with a non-negative value.
	(setScale (int)): New public method.
	(setScale (int,int)): New public method.

From-SVN: r38861
2001-01-10 09:38:08 +00:00
Oskar Liljeblad 10a855c7f4 re PR libgcj/1338 (StreamTokenizer does not handle /* comments correctly)
2001-01-09  Oskar Liljeblad <osk@hem.passagen.se>

	Fix for PR libgcj/1338:
	* java/io/StreamTokenizer.java (nextToken): Handle // and /* before
	commentChar.  Fixed typos in comments.

From-SVN: r38830
2001-01-09 11:21:12 +00:00
Warren Levy 3824a48600 re PR libgcj/1411 (natTimeZone.cc should be removed)
Fix for PR libgcj/1411:
	* Makefile.am: Removed java/util/natTimeZone.cc.
	* Makefile.in: Rebuilt.
	* gnu/gcj/text/LocaleData_en_US.java (zoneStringsDefault): Added
	missing localized timezone names.
	* java/lang/System.java (getDefaultTimeZoneId): New private method.
	* java/lang/natSystem.cc (getSystemTimeZone): New private method.
	(init_properties): Set user.timezone property.
	* java/text/DateFormatSymbols.java (zoneStringsDefault): Added
	default timezone names; removed non-standard ones.  Use standard
	ID names per JCL.
	* java/util/Date.java (toGMTString): Removed zoneGMT variable.
	(UTC): Ditto.
	* java/util/TimeZone.java: Add standard ID names per JCL; removed
	non-standard ones.
	(getDefaultTimeZoneId): Removed.
	(zoneGMT): Removed.
	(getDefaultTimeZoneId): Removed.
	* java/util/natTimeZone.cc: Removed.

From-SVN: r38816
2001-01-09 07:07:51 +00:00
Bryce McKinlay 5bb11b2e20 In gcc/java:
* class.c (make_class_data): Push initial value for "arrayclass".
	* decl.c (init_decl_processing): Add new class field "arrayclass".

In libjava:
	* java/lang/Class.h (_Jv_InitClass): Use __builtin_expect.
	(_Jv_NewArrayClass): Renamed from _Jv_FindArrayClass.
	(_Jv_GetArrayClass): New inline function.
	(arrayclass): New field.
	* prims.cc (_Jv_NewObjectArray): Use _Jv_GetArrayClass. Don't use
	_Jv_GetArrayElementFromElementType.
	(_Jv_NewPrimArray): Ditto.
	(_Jv_PrimClass constructor): Initialize "depth", "ancestors", and
	"idt" for completeness. Initialze "arrayclass" using _Jv_NewArrayClass.
	Set Modifier::ABSTRACT.
	* java/lang/natClassLoader.cc (_Jv_NewClass): Initialize "arrayclass".
	(_Jv_NewArrayClass): Renamed from _Jv_FindArrayClass. Now void.
	Now synchronized. Array classes are now referenced from
	elementClass->arrayclass. Don't use _Jv_FindClassInCache.
	Set array classes' accessibility flags correctly. Optimize so that
	all array classes share the same IDT.
	* java/lang/reflect/natArray.cc (newInstance): Use _Jv_GetArrayClass.
	* java/lang/reflect/natMethod.cc (_Jv_GetTypesFromSignature): Ditto.
	* java/lang/natClass.cc (_getFields): Increment offset. Prevent fields
	in superclasses from overwriting classes own fields.
	(_Jv_IsAssignableFrom): Check for NULL source idt instead of calling
	Modifier::isAbstract().
	(null_idt): New static field.
	(_Jv_PrepareConstantTimeTables): Optimize case where class implements
	no interfaces.
	(_Jv_IndexOf): Made inline.
	* boehm.cc (_Jv_MarkObj): Mark "arrayclass" field.

From-SVN: r38808
2001-01-08 23:28:56 +00:00
Tom Tromey 5bab9296f5 re PR java/1586 (linux build problem for libjava - cpplib (?))
Fix for PR java/1586:
	* Makefile.in: Rebuilt.
	* Makefile.am (AUTOMAKE_OPTIONS): Added no-dependencies.

From-SVN: r38807
2001-01-08 22:55:15 +00:00
Bryce McKinlay 0a8f3dbb7a Makefile.am: Use the new "-M -MF" option for generating dependencies from the c++ compiler.
* Makefile.am: Use the new "-M -MF" option for generating dependencies
	from the c++ compiler.
	* Makefile.in: Rebuilt.

From-SVN: r38794
2001-01-08 07:55:25 +00:00
Bryce McKinlay 4fd297757d * libjava.compile/SuperConstr.java: New test case.
From-SVN: r38793
2001-01-08 02:13:32 +00:00
Anthony Green 6a9d31a7d4 001-01-07 Anthony Green <green@redhat.com>
* Makefile.am (texinfo): Add texinfo target for generating texinfo
        documentation.
	* Makefile.in: Rebuilt.

	* scripts/TexinfoDoclet.java: New file.

	* doc/java-applet.texi, doc/java-lang-reflect.texi,
	doc/java-awt-color.texi, doc/java-lang.texi,
	doc/java-awt-datatransfer.texi, doc/java-math.texi,
        doc/java-awt-event.texi, doc/java-net.texi,
	doc/java-awt-geom.texi, doc/java-security-spec.texi,
	doc/java-awt-image.texi, doc/java-security.texi,
	doc/java-awt-peer.texi, doc/java-sql.texi, doc/java-awt.texi,
	doc/java-text.texi, doc/java-beans-beancontext.texi,
        doc/java-util-jar.texi, doc/java-beans.texi,
	doc/java-util-zip.texi, doc/java-io.texi, doc/java-util.texi,
	doc/java-lang-ref.texi: New files.

From-SVN: r38789
2001-01-08 00:27:51 +00:00
Anthony Green bc6d273e64 Fix bug in URLConnection and correct javadoc annotations in StringBuffer.
From-SVN: r38781
2001-01-07 20:01:46 +00:00
Anthony Green 0e2e89fd2e Fix comments for doclets
From-SVN: r38754
2001-01-06 23:28:40 +00:00
Bryce McKinlay a7fabf19be * java/io/PipedReader: Synchronize on "lock" instead of this.
From-SVN: r38731
2001-01-05 23:30:50 +00:00
Bryce McKinlay 865b4ea73f PipedInputStream: Rewrote to be simpler and more correct.
* java/io/PipedInputStream: Rewrote to be simpler and more correct.
	* java/io/PipedOutputStream: Updated to match new PipedInputStream.
	* java/io/PipedReader: New implementation based on new
	PipedInputStream.
	* java/io/PipedWriter: Updated to match new PipedOutputStream.

From-SVN: r38708
2001-01-05 08:23:51 +00:00
Bryce McKinlay 7ae30a9196 * java/lang/Thread.java: Update comment.
From-SVN: r38697
2001-01-05 00:31:45 +00:00
Tom Tromey 234fb86cae ScrollPane.java (setBlockIncrement): Throw error.
* java/awt/ScrollPane.java (setBlockIncrement): Throw error.
	(getViewportSize): Insets include scrollbar size.
	(doLayout): Finished.
	(getScrollPosition): Wrote.
	* java/awt/peer/ScrollPanePeer.java (setBlockIncrement): Removed.

From-SVN: r38670
2001-01-03 20:34:44 +00:00
Tom Tromey f5826791be ScrollPane.java: Wrote.
* java/awt/ScrollPane.java: Wrote.
	* java/awt/peer/ScrollPanePeer.java (setBlockIncrement): New
	method.

	* java/awt/Panel.java (Panel()): Fixed.

	* java/awt/Component.java (isShowing): Return false if no peer
	exists, and true if component is visible and no parent exists.
	(getLocationOnScreen): Wrote.
	(getPreferredSize): Removed FIXME comment.
	(getMinimumSize): Likewise.
	(getAlignmentX, getAlignmentY): Wrote.
	(list): Wrote.
	(requestFocus): Wrote.
	(transferFocus): Wrote.
	(findNextFocusComponent): New method.
	(hasFocus()): Wrote.
	(checkImage): Wrote.
	(enableEvents): Call setEventMask on the peer.

	* java/awt/Container.java (list): Use super.list() to print self.
	(findNextFocusComponent): New method.
	(setLayout): Call invalidate.
	(findComponentAt): Wrote.

From-SVN: r38639
2001-01-03 00:07:13 +00:00
Bryce McKinlay 2e9ab75de4 Forgot these in last commit.
From-SVN: r38558
2000-12-30 12:22:15 +00:00
Bryce McKinlay e301621d19 For boehm-gc:
* configure.in: Rename THREADLIB to THREADLIBS.
	* Makefile.am (LINK): Add $(THREADLIBS) to libtool command line. This
	ensures that we link the correct version of the linuxthreads semaphore
	functions.
	* Makefile.in: Rebuilt.
	* configure: Rebuilt.

	* linux_thread.c (GC_thr_init, GC_suspend_handler): Add SIGABRT to the
	list of signals which are not blocked during suspend in the NO_SIGNALS
	case.

For libjava:
	* Makefile.am (libgcj_la_LIBADD): Add $(THREADLIBS). This ensures that
	the correct versions of various linuxthreads functions get linked.
	* Makefile.in: Rebuilt.
	* java/lang/natThread.cc (finalize_native): New static function. Call
	_Jv_ThreadDestroyData.
	(initialize_native): Register finalizer for "data".
	* include/posix-threads.h (_Jv_ThreadInitData): New simpler prototype.
	(_Jv_ThreadDestroyData): New prototype.
	* include/win32-threads.h: Ditto.
	* include/no-threads.h: Ditto.
	* posix-threads.cc (_Jv_ThreadInitData): Implement new prototype.
	(_Jv_ThreadDestroyData): New function. Free native thread "data" and
	move mutex and condition variable destroy code from:
	(really_start): ...here.
	(_Jv_ThreadStart): Set PTHREAD_CREATE_DETACHED.
	* win32-threads.cc (_Jv_ThreadInitData): Implement new prototype.
	(_Jv_ThreadDestroyData): Implemented.
	* nogc.cc (_Jv_AllocObject): Use "void *" not "ptr_t".
	(_Jv_AllocArray): Ditto.

From-SVN: r38557
2000-12-30 12:18:39 +00:00
Jeff Sturm 4c58589f1a DriverManager.java (getConnection): Don't set user/password properties if null.
2000-12-27  Jeff Sturm  <jeff.sturm@commerceone.com>

	* java/sql/DriverManager.java (getConnection): Don't set
	user/password properties if null.

From-SVN: r38516
2000-12-28 22:21:36 +00:00
Warren Levy ed55bdc47f re PR libgcj/1358 (java.util.Date.toString() doesn't seem to behave properly.)
Fix for PR libgcj/1358:
	* java/lang/System.java: Update Copyright date properly.
	* java/util/Calendar.java: Fix typo in comment.
	(set): Set 24-hour clock hour instead of 12-hour clock hour.
	* java/util/GregorianCalendar.java (GregorianCalendar): Properly
	initialize times.  Spec says to set H:M:S values to zero only if
	a date is given.
	* java/util/TimeZone.java (getDefaultDisplayName): Casts to char
	needed for evaluating numbers '0' to '9' in printouts of GMT offsets.
	* java/util/natGregorianCalendar.cc (computeTime): Properly handle
	timezones and GMT offsets, being careful to account for units of
	milliseconds vs. seconds.

From-SVN: r38508
2000-12-28 05:55:56 +00:00
Bryce McKinlay 6147e9d0c9 re PR libgcj/1516 (Method.invoke won't accept boolean parameters)
Fix for PR libgcj/1516:
	* java/lang/reflect/natMethod.cc (primitives): Remove void entry.
	Add boolean entry.
	(can_widen): Declared inline. Remove redundant checks for void
	arguments and char->short conversion. Add special case for boolean
	conversions.
	(ffi_type): Declared inline.
	(_Jv_CallAnyMethodA): Move unwrapping logic inside isPrimitive() block.

From-SVN: r38506
2000-12-28 04:34:33 +00:00
Bryce McKinlay 867e24ad3d natClass.cc (_Jv_IsAssignableFrom): Primitive TYPEs can not be assigned to Object.
* java/lang/natClass.cc (_Jv_IsAssignableFrom): Primitive TYPEs can
	not be assigned to Object.

From-SVN: r38505
2000-12-28 04:33:53 +00:00
Petter Reinholdtsen c4f58426c1 SQLWarning.java: Fixed typo in comment.
2000-12-26  Petter Reinholdtsen  <pere@hungry.com>

	* java/sql/SQLWarning.java: Fixed typo in comment.

From-SVN: r38493
2000-12-27 01:58:23 +00:00
Tom Tromey b3b90f82f4 MenuItem.java (paramString): Now protected.
* java/awt/MenuItem.java (paramString): Now protected.

	* java/awt/MenuShortcut.java: Implements Serializable.

	* java/awt/MenuBar.java: Rewrote from scratch.

	* java/awt/MenuComponent.java (removeNotify): Wrote.
	Implements Serializable.

	* java/awt/GridBagConstraints.java (GridBagConstraints): New
	constructor.

	* java/awt/CheckboxMenuItem.java: Wrote.

From-SVN: r38488
2000-12-26 07:18:16 +00:00
Tom Tromey 5472d1951a MenuContainer.java: Fixed typo.
* java/awt/MenuContainer.java: Fixed typo.

	* Makefile.in: Rebuilt.
	* Makefile.am (awt_java_source_files): Added SystemColor.java.
	* java/awt/SystemColor.java: New file.

	* java/awt/Color.java (rgba): Now package-private.

	* java/awt/event/InputEvent.java (isAltGraphDown): New method.

	* java/awt/event/ContainerEvent.java (getContainer): Renamed from
	getComponent.

	* java/awt/MenuItem.java (addNotify): New method.
	(MenuItem(String,MenuShortcut)): New constructor.
	(setLabel): Notify peer of change.
	(setEnabled): Likewise.

	* java/awt/GridLayout.java (toString): New method.

	* java/awt/FlowLayout.java (LEADING, TRAILING): New constants.
	(FlowLayout): Check for LEADING and TRAILING.
	(setAlignment): Likewise.
	(layoutContainer): Handle component orientation.

	* java/awt/Component.java (orientatin): New field.
	(setComponentOrientation): Wrote.
	(getComponentOrientation): Wrote.

	* java/awt/Event.java (Event): Implements Serializable.
	(consumed): New field for serialization.
	* java/awt/Dimension.java (Dimension): Implements Serializable.
	* java/awt/Cursor.java (Cursor): Implements Serializable.
	* java/awt/Container.java (Container): No longer abstract.

	* java/awt/Choice.java: Wrote.
	* java/awt/Checkbox.java: Wrote.
	* java/awt/ItemSelectable.java: Documented.
	* java/awt/CheckboxGroup.java: Wrote.

	* java/awt/CardLayout.java (layoutContainer): Directly use fields
	in other classes.
	(getSize): Likewise.

From-SVN: r38486
2000-12-26 00:25:13 +00:00
Jeff Sturm 83050e0d93 FileDescriptor.java: Initialize fd to -1.
2000-12-24  Jeff Sturm  <jeff.sturm@commerceone.com>

	* java/io/FileDescriptor.java: Initialize fd to -1.
	Remove default constructor.

From-SVN: r38485
2000-12-26 00:24:01 +00:00
Joseph Myers 93b0dee779 * java/lang/mprec.h: Change C9X reference to refer to C99.
From-SVN: r38481
2000-12-23 23:38:51 +00:00
Bryce McKinlay 86a42a5f24 Throwable.java (trace_enabled): New static field.
* java/lang/Throwable.java (trace_enabled): New static field.
	* java/lang/natThrowable.cc (fillInStackTrace): Do nothing if
	trace_enabled not set.
	* prims.cc (main_init): Turn off trace_enabled while creating
	default exception objects.

From-SVN: r38442
2000-12-22 06:19:24 +00:00
Tom Tromey 5ebee7d409 PropertyChangeListener.java: Extends EventListener.
* java/beans/PropertyChangeListener.java: Extends EventListener.
	* java/beans/VetoableChangeListener.java: Extends EventListener.

From-SVN: r38421
2000-12-21 18:39:43 +00:00
Tom Tromey 465c091ce9 * java/util/zip/Deflater.java (update, init): Now private.
From-SVN: r38420
2000-12-21 18:39:19 +00:00
Bryce McKinlay f387d86265 BasicMapEntry.java: Re-added.
* java/util/BasicMapEntry.java: Re-added.
	* java/util/HashMap.java (Entry): Extend BasicMapEntry.
	(putAll): Test for BasicMapEntry.
	* java/util/Hashtable.java (Entry): Extend BasicMapEntry.
	(putAll): Test for BasicMapEntry.
	Change references from `HashMap.Entry' to `Entry' in various places.
	* Makefile.am: Add BasicMapEntry.java.
	* Makefile.in: Rebuilt.

From-SVN: r38410
2000-12-21 02:00:15 +00:00
Warren Levy 1889cf4a71 GregorianCalendar.java (GregorianCalendar): Constructors need to set timezone to a valid non-null value.
* java/util/GregorianCalendar.java (GregorianCalendar): Constructors
	need to set timezone to a valid non-null value.  Partial fix for
	PR 331.

From-SVN: r38375
2000-12-19 07:48:54 +00:00