Commit Graph

66 Commits

Author SHA1 Message Date
Tom Tromey 01b02b11de acconfig.h (GCJVERSION): New undef.
* acconfig.h (GCJVERSION): New undef.
	* java/lang/natSystem.cc (init_properties): Define java.version,
	java.class.version, os.name, os.arch, os.version.
	Include <sys/utsname.h> if required.
	* configure: Rebuilt.
	* configure.in: Compute and define GCJVERSION.
	* java/lang/natSystem.cc (default_file_encoding): Now static.

From-SVN: r26830
1999-05-07 18:44:38 +00:00
Tom Tromey c59c5e9a65 * java/lang/natCharacter.cc (isLowerCase): Use a binary search.
From-SVN: r26829
1999-05-07 17:39:52 +00:00
Per Bothner 11a606ebaf natSystem.cc (DEFAULT_FILE_ENCODING): New macro.
�
	* java/lang/natSystem.cc (DEFAULT_FILE_ENCODING):  New macro.
	(default_file_encoding):  New global, initial value is above macro.
	(init_properties):  Default file.encoding to default_file_encoding.

From-SVN: r26797
1999-05-05 17:24:08 -07:00
Tom Tromey 9096b279c2 Makefile.in: Rebuilt.
* Makefile.in: Rebuilt.
	* Makefile.am (CLEANFILES): Don't mention $(class_files).
	(clean-local): New target
	* java/lang/natRuntime.cc: Include <ltdl.h> if required.
	(load, loadLibrary): Now native.
	(init): New method.
	* java/lang/Runtime.java (load, loadLibrary): Now native.
	(init): New native method.
	(Runtime): Use init.
	* prims.cc: Include <ltdl.h> if required.
	(JvRunMain): Call LTDL_SET_PRELOADED_SYMBOLS.

From-SVN: r26785
1999-05-05 14:19:24 +00:00
Tom Tromey a0e894a8cc StringBuffer.java (ensureCapacity): Don't resize vector when shared.
* java/lang/StringBuffer.java (ensureCapacity): Don't resize
	vector when shared.
	* java/util/Locale.java (Locale(String,String)): Implement in
	terms of 3-argument version; variant now defaults to empty
	string.
	(toString): Assume variant is not null.
	(equals): Assume all strings are not null.
	(Locale): Throw NullPointerException if any argument is null.
	* java/util/ResourceBundle.java (getBundle): Don't try the base
	name; now implicit in partialGetBundle call.
	(trySomeGetBundle): Search for parent bundles and call setParent
	as required.
	(partialGetBundle): Added `langStop' argument.  Use
	`Locale.toString' to compute bundleName.
	(resource_cache): New static field.
	(partialGetBundle): Cache the returned resource bundle.  Now
	synchronized.
	* gnu/gcj/text/LocaleData_en.java (contents): [collatorRule] Added
	missing `<'.
	* mauve-libgcj: Enable Collator and RuleBasedCollator.
	* java/text/natCollator.cc (decomposeCharacter): `base' now
	`const'.
	* Makefile.in: Rebuilt.
	* Makefile.am (ordinary_java_source_files): Added
	CollationElementIterator, CollationKey, Collator,
	RuleBasedCollator.
	(nat_source_files): Added natCollator.cc.
	* java/text/RuleBasedCollator.java (ceiNext): No longer static.
	(compare): Pass `this' to CollationElementIterator constructor.
	(getCollationElementIterator): Likewise.
	(ceiNext): Fix off-by-one error when finding initial substring.
	(next): Correctly mask off bits when computing return value.
	Fixed return values when one string is shorter than the other.
	* java/text/CollationElementIterator.java (collator): New field.
	(CollationElementIterator): Added collator argument.
	(next): Call ceiNext on collator object.

From-SVN: r26707
1999-04-30 09:31:00 +00:00
Tom Tromey baa288f308 natString.cc (getBytes): Reverted earlier change and applied correct fix from Per Bothner.
* java/lang/natString.cc (getBytes): Reverted earlier change and
	applied correct fix from Per Bothner.

From-SVN: r26579
1999-04-21 13:50:39 +00:00
Tom Tromey 9d9cf1661d String.java: Don't throw UnsupportedEncodingException.
* java/lang/String.java: Don't throw
	UnsupportedEncodingException.

From-SVN: r26577
1999-04-21 12:12:39 +00:00
Tom Tromey 47e2610954 natString.cc (getBytes): Correctly size result buffer.
* java/lang/natString.cc (getBytes): Correctly size result
	buffer.  From Bryce McKinlay <bryce@albatross.co.nz>.

From-SVN: r26575
1999-04-21 11:49:39 +00:00
Tom Tromey 3d79e10b31 natSystem.cc (init_properties): Only declare pwd_entry once.
* java/lang/natSystem.cc (init_properties): Only declare pwd_entry
	once.  From Anthony Green.

From-SVN: r26545
1999-04-19 09:43:18 +00:00
Per Bothner a99ce7cae5 InputStreamReader.java (<init>): Set super.in correctly.
�
	* java/io/InputStreamReader.java (<init>):  Set super.in correctly.
	* java/io/OutputStreamWriter.java (<init>):  Set super.in correctly.
	(writeChars):  Don't be quite so eager to flush.
	* java/io/PrintStream.java:  Rewrite.  Now more similar to
	OutputStreamWriter, using explicit UnicodeToBytes converter.
	Also, autoflush does not need to flush so often.
	* java/lang/natString.cc (getBytes):  More efficient algorithm.
 	(init(jbyteArray,jint,jint,jstring)):  More efficient.

From-SVN: r26508
1999-04-16 11:34:58 -07:00
Andrew Haley 2b37afcb36 natDouble.java (doubleToLongBits): ensure that all NaNs are always converted to the same long value.
1999-04-14  Andrew Haley  <aph@cygnus.com>
        * java/lang/natDouble.java (doubleToLongBits): ensure that all
        NaNs are always converted to the same long value.
        * java/lang/natFloat.java (floatToIntBits): ditto, but for float
        converted to int.

From-SVN: r26439
1999-04-14 07:10:22 +00:00
Tom Tromey b81194219b natSystem.cc (arraycopy): Don't always use jbyteArray; instead switch on actual element type.
* java/lang/natSystem.cc (arraycopy): Don't always use jbyteArray;
	instead switch on actual element type.

From-SVN: r26405
1999-04-13 12:16:41 +00:00
Tom Tromey 69d5914bd0 natSystem.cc (SystemClass): New define.
* java/lang/natSystem.cc (SystemClass): New define.
	(init_properties): Synchronize.

From-SVN: r26372
1999-04-12 12:34:41 +00:00
Tom Tromey c86e69b2f9 Long.java (parseLong): Corrected overflow detection code.
* java/lang/Long.java (parseLong): Corrected overflow detection
	code.
	* java/lang/Integer.java (parseInt): Corrected overflow detection
	code.

From-SVN: r26295
1999-04-08 11:57:28 +00:00
Warren Levy 9a566c0926 natString.cc (init(jbyteArray,jint,jint,jstring)): Set count to 0 when InputStreamReader returns -1 for EOF.
* java/lang/natString.cc (init(jbyteArray,jint,jint,jstring)):
	Set count to 0 when InputStreamReader returns -1 for EOF.

From-SVN: r26273
1999-04-07 19:31:01 +00:00
Tom Tromey ee9dd3721b Initial revision
From-SVN: r26263
1999-04-07 14:42:40 +00:00