On 20 November, 2014 - Dirk Hohndel wrote: > On Thu, Nov 20, 2014 at 07:30:20AM +0100, Anton Lundin wrote: > > > > @@ -658,6 +662,14 @@ int parse_txt_file(const char *filename, const > > > > char *csv) > > > > case 39: > > > > add_sample_data(sample, > > > > POSEIDON_TEMP, value); > > > > break; > > > > + case 85: > > > > + //He diluent part in % > > > > + gaschange ^= value << > > > > 16; > > > > + break; > > > > + case 86: > > > > + //O2 diluent part in % > > > > + gaschange ^= value; > > > > + break; > > > > default: > > > > > > Bitwise XOR? Seriously? > > > > It just builds a "regular" gaschange value. I can switch it to using add > > there instead, or feel free to s/\^/+/ it. The result is the same. > > Well, this is not the obfuscated C contest. Yes, if you know that the > original bits were 0 then XOR acts the same way as OR, but seriously... > What made you write it this way? >
Dunno =) Probably due to me wring enough low-lever bit magic lately against dive computers to have that show up in my head as a wise choice =) I can roll a patch later tonight cleaning that up. //Anton -- Anton Lundin +46702-161604 _______________________________________________ subsurface mailing list subsurface@subsurface-divelog.org http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface