On Sun, Jul 07, 2013 at 02:41:50PM +0200, Andreas Eversberg wrote:
hi holger,
Dear Andreas,
i just pushed a branch (jolly/7bit_ussd) i was working
on the last
hours. it is quite exactly what you prosed.
I don't think it needs much splitting my comments are:
* If it helps we can export 'shift' from the common function as well,
maybe this simplifies your calculation.
* I would write ('\r' << 1), it is more obvious than 0x1A and modern
compilers propagate such constants.
* The decoding, it might be easier to verify this condition on the
encoded data?
* In the encoding. If you change octets you also want to modify 'y'
as the number of septets.
also it includes a test case. the result is similar to
your proposal.
What I don't understand is.. why the first broken version if you know
it is not correct? It didn't save any of your time and it wasted plenty
of mine.