[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gpsd-dev] from_sixbit() ...
From: |
Eric S. Raymond |
Subject: |
Re: [gpsd-dev] from_sixbit() ... |
Date: |
Sun, 15 Sep 2013 18:05:51 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
address@hidden <address@hidden>:
> Hallo,
>
> i have looked at all other from_sixbit() call's in driver_ais.c .
>
> Can someone please check all from_sixbit() call's too.
>
> Most calls use bitlen-<startpos> as length parameter.
>
> I, at least my, understanding, it should be (bitlen-<startpos>)/6+1 ....
>
> The second part of ais message 21
>
> from_sixbit((unsigned char *)bits,
> 272, (bitlen - 272)/6,
> ais->type21.name+20);
>
> If the call
>
> from_sixbit((unsigned char *)bits,
> 43, 21, ais->type21.name);
>
> is correct, ( I assume it is, see my previous mail), then the second call is
> not correct...
>
>
> Reinhard
I've just pushed a change that wraps all but one sixbit() call in a macro that
should make the code easier to understand and modify.
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>