Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / libjava / gnu / gcj / convert / Input_ASCII.java
blobcb531e980d087c61ebba51d1596d6597a338752f
1 /* Copyright (C) 2000 Free Software Foundation
3 This file is part of libgcj.
5 This software is copyrighted work licensed under the terms of the
6 Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
7 details. */
9 package gnu.gcj.convert;
11 /**
12 * Convert ASCII text to Unicode.
13 * @date October 2000
16 public class Input_ASCII extends BytesToUnicode
18 public String getName() { return "ASCII"; }
20 public int read (char[] outbuffer, int outpos, int count)
22 int origpos = outpos;
23 // Make sure fields of this are in registers.
24 int inpos = this.inpos;
25 byte[] inbuffer = this.inbuffer;
26 int inavail = this.inlength - inpos;
27 int outavail = count;
28 if (outavail > inavail)
29 outavail = inavail;
30 while (--outavail >= 0)
32 outbuffer[outpos++] = (char) (inbuffer[inpos++] & 0x7f);
34 this.inpos = inpos;
35 return outpos - origpos;