[BRLTTY] Java Bindings DOT8
Dave Mielke
dave at mielke.cc
Wed May 27 01:23:15 EDT 2009
[quoted lines by Simon Meers on 2009/05/27 at 12:59 +1000]
>I had already patched mine by changing Constants.java to define DOT8 as
>-0200, which worked perfectly.
That, actually, in my opinion, isn't a good way to do it. It only works by
accident for that exact value. Let's say, for example, that we were defining
DOT7, which is 0100. -0100 would be 0277.
>Even if they were chars, wouldn't you get compilation errors when trying to
>pack them into a byte[] array (signed) for writeDots?
Yes, of course. I was suffering from bilingual confusion, i.e. thinking of a
char as it's used in C. Those DOTn constants should really be defined as bytes,
which they now are. Even then, of course, using 0200 as an initializer fails.
Type-casting the constant as a byte, however, works fine. Please retest again.
>I've svn up'd to r4503, but cannot see any Java-related changes?
Constants.java is generated. The actual change is in constants.awk.
--
Dave Mielke | 2213 Fox Crescent | The Bible is the very Word of God.
Phone: 1-613-726-0014 | Ottawa, Ontario | 2011 May 21 is the Day of Judgement.
EMail: dave at mielke.cc | Canada K2A 1H7 | 2011 Oct 21 is the End of the World.
http://FamilyRadio.com/ | http://Mielke.cc/bible/
More information about the BRLTTY
mailing list