Output_UnicodeLittleUnmarked.java: New file.

2004-10-28  David Daney  <ddaney@avtrex.com>

	* gnu/gcj/convert/Output_UnicodeLittleUnmarked.java: New file.
	* Makefile.am: Build it.
	* Makefile.in: Regenerate.

From-SVN: r89763
This commit is contained in:
David Daney 2004-10-28 15:22:44 +00:00 committed by David Daney
parent 9054261dcf
commit 86ce0e3d22
4 changed files with 59 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2004-10-28 David Daney <ddaney@avtrex.com>
* gnu/gcj/convert/Output_UnicodeLittleUnmarked.java: New file.
* Makefile.am: Build it.
* Makefile.in: Regenerate.
2004-10-27 Aaron W. LaFramboise <aaronavay62@aaronwl.com>
PR libgcj/18104

View File

@ -975,6 +975,7 @@ gnu/gcj/convert/Output_ASCII.java \
gnu/gcj/convert/Output_EUCJIS.java \
gnu/gcj/convert/Output_JavaSrc.java \
gnu/gcj/convert/Output_SJIS.java \
gnu/gcj/convert/Output_UnicodeLittleUnmarked.java \
gnu/gcj/convert/Output_UTF8.java \
gnu/gcj/convert/Output_iconv.java \
gnu/gcj/convert/UnicodeToBytes.java

View File

@ -1881,6 +1881,7 @@ am__libgcj_la_SOURCES_DIST = prims.cc jni.cc exception.cc resolve.cc \
gnu/gcj/convert/Output_EUCJIS.java \
gnu/gcj/convert/Output_JavaSrc.java \
gnu/gcj/convert/Output_SJIS.java \
gnu/gcj/convert/Output_UnicodeLittleUnmarked.java \
gnu/gcj/convert/Output_UTF8.java \
gnu/gcj/convert/Output_iconv.java \
gnu/gcj/convert/UnicodeToBytes.java \
@ -3131,8 +3132,9 @@ am__objects_12 = gnu/gcj/convert/BytesToUnicode.lo \
gnu/gcj/convert/Output_ASCII.lo \
gnu/gcj/convert/Output_EUCJIS.lo \
gnu/gcj/convert/Output_JavaSrc.lo \
gnu/gcj/convert/Output_SJIS.lo gnu/gcj/convert/Output_UTF8.lo \
gnu/gcj/convert/Output_iconv.lo \
gnu/gcj/convert/Output_SJIS.lo \
gnu/gcj/convert/Output_UnicodeLittleUnmarked.lo \
gnu/gcj/convert/Output_UTF8.lo gnu/gcj/convert/Output_iconv.lo \
gnu/gcj/convert/UnicodeToBytes.lo
am__objects_13 = javax/accessibility/Accessible.lo \
javax/accessibility/AccessibleAction.lo \
@ -4768,6 +4770,7 @@ gnu/gcj/convert/Output_ASCII.java \
gnu/gcj/convert/Output_EUCJIS.java \
gnu/gcj/convert/Output_JavaSrc.java \
gnu/gcj/convert/Output_SJIS.java \
gnu/gcj/convert/Output_UnicodeLittleUnmarked.java \
gnu/gcj/convert/Output_UTF8.java \
gnu/gcj/convert/Output_iconv.java \
gnu/gcj/convert/UnicodeToBytes.java
@ -12731,6 +12734,9 @@ gnu/gcj/convert/Output_JavaSrc.lo: gnu/gcj/convert/$(am__dirstamp) \
gnu/gcj/convert/$(DEPDIR)/$(am__dirstamp)
gnu/gcj/convert/Output_SJIS.lo: gnu/gcj/convert/$(am__dirstamp) \
gnu/gcj/convert/$(DEPDIR)/$(am__dirstamp)
gnu/gcj/convert/Output_UnicodeLittleUnmarked.lo: \
gnu/gcj/convert/$(am__dirstamp) \
gnu/gcj/convert/$(DEPDIR)/$(am__dirstamp)
gnu/gcj/convert/Output_UTF8.lo: gnu/gcj/convert/$(am__dirstamp) \
gnu/gcj/convert/$(DEPDIR)/$(am__dirstamp)
gnu/gcj/convert/Output_iconv.lo: gnu/gcj/convert/$(am__dirstamp) \
@ -14131,6 +14137,8 @@ mostlyclean-compile:
-rm -f gnu/gcj/convert/Output_SJIS.lo
-rm -f gnu/gcj/convert/Output_UTF8.$(OBJEXT)
-rm -f gnu/gcj/convert/Output_UTF8.lo
-rm -f gnu/gcj/convert/Output_UnicodeLittleUnmarked.$(OBJEXT)
-rm -f gnu/gcj/convert/Output_UnicodeLittleUnmarked.lo
-rm -f gnu/gcj/convert/Output_iconv.$(OBJEXT)
-rm -f gnu/gcj/convert/Output_iconv.lo
-rm -f gnu/gcj/convert/UnicodeToBytes.$(OBJEXT)
@ -19043,6 +19051,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/convert/$(DEPDIR)/Output_JavaSrc.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/convert/$(DEPDIR)/Output_SJIS.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/convert/$(DEPDIR)/Output_UTF8.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/convert/$(DEPDIR)/Output_UnicodeLittleUnmarked.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/convert/$(DEPDIR)/Output_iconv.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/convert/$(DEPDIR)/UnicodeToBytes.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@gnu/gcj/convert/$(DEPDIR)/Unicode_to_JIS.Plo@am__quote@

View File

@ -0,0 +1,41 @@
/* Copyright (C) 2004 Free Software Foundation
This file is part of libgcj.
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
package gnu.gcj.convert;
/**
* Convert to Unicode Little Endian, no marker
*/
public class Output_UnicodeLittleUnmarked extends UnicodeToBytes
{
public String getName() { return "UnicodeLittleUnmarked"; }
/** Convert chars to bytes.
* Converted bytes are written to buf, starting at count.
* @param inbuffer source of characters to convert
* @param inpos index of initial character in inbuffer to convert
* @param inlength number of characters to convert
* @return number of chars converted
* Also, this.count is increment by the number of bytes converted.
*/
public int write (char[] inbuffer, int inpos, int inlength)
{
int avail = buf.length - count;
if (inlength * 2 > avail)
inlength = avail / 2;
for (int i = inlength; i > 0; i--)
{
char c = inbuffer[inpos++];
buf[count] = (byte)c;
buf[count+1] = (byte)(c >> 8);
count += 2;
}
return inlength;
}
}