gcc/libjava/gnu/gcj/convert/Input_8859_1.java
Per Bothner 7b824de381 JIS0201.h: New file, generated from Unicode table.
�
	* gnu/gcj/convert/JIS0201.h:  New file, generated from Unicode table.
	* gnu/gcj/convert/Input_JavaSrc.java: New BytesToUnicode class.
	* gnu/gcj/convert/Input_SJIS.java: New BytesToUnicode class.
	* gnu/gcj/convert/Output_EUCJIS.java:  New UnicodeToBytes class.
	* gnu/gcj/convert/Output_SJIS.java:  New UnicodeToBytes class.
	* gnu/gcj/convert/natInput_EUCJIS.cc:  New file.
	* gnu/gcj/convert/natInput_SJIS.cc:  New file.
	* gnu/gcj/convert/natOutput_EUCJIS.cc:  New file.
	* gnu/gcj/convert/natOutput_SJIS.cc:  New file.
	* gnu/gcj/convert/make-trie.c:  New file: functions to make a trie.
	* gnu/gcj/convert/gen-from-JIS.c:  Invoke make-trie for output.
	* gnu/gcj/convert/Unicode_to_JIS.cc:  New generated trie table.

From-SVN: r26501
1999-04-16 10:25:08 -07:00

39 lines
968 B
Java

/* Copyright (C) 1999 Cygnus Solutions
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 ISO-Latin-1 (8851-1) text to Unicode.
* @author Per Bothner <bothner@cygnus.com>
* @date Match 1999.
*/
public class Input_8859_1 extends BytesToUnicode
{
public String getName() { return "8859_1"; }
public int read (char[] outbuffer, int outpos, int outlength)
{
int origpos = outpos;
// Make sure fields of this are in registers.
int inpos = this.inpos;
byte[] inbuffer = this.inbuffer;
int inavail = this.inlength - inpos;
int outavail = outlength - outpos;
if (outavail > inavail)
outavail = inavail;
while (--outavail >= 0)
{
outbuffer[outpos++] = (char) (inbuffer[inpos++] & 0xFF);
}
this.inpos = inpos;
return outpos - origpos;
}
}