I don't know enough about these sources to comment on the patches, except
this small thing.

On Wed, 25 Apr 2001, J. Russell Smyth wrote:
> gnu/java/io/decode/DecoderEightBitLookup.javav - convertToChar wouldnt
> work with ascii values above 128 due to byte-char conversion
>
> public char[]
> convertToChars(byte[] buf, int buf_offset, int len, char[] cbuf,
>                int cbuf_offset)
> {
>
>   for (int i = 0; i < len; i++){
> -   cbuf[cbuf_offset + i] = lookup_table[buf[buf_offset + i]];
> +   cbuf[cbuf_offset + i]
> =lookup_table[buf[buf_offset+i]<0?256+buf[buf_offset+i]:buf[buf_offset+i]];

Why don't you write:

cbuf[cbuf_offset + i] = lookup_table[buf[buf_offset+i] & 0xff];

I think this is clearer and faster.

>   }
>
>   return(cbuf);
> }

Best,
  Erwin Bolwidt



_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath

Reply via email to