From: Cyrill G. <gor...@gm...> - 2009-09-20 06:52:26
|
[anonymous coward - Sun, Sep 20, 2009 at 12:26:29AM +0200] | > | DB = -127...255 | > I suppose you meant [-128;255]. | | Yes. | | > I find Peter's functions clean/elegant way indeed (in | > which I never doubt :). | | hpa wrote: | > The only issue is that for bytes == 8 some compilers | > will warn. | | It is undefined behavior (see e.g. C99 6.5.7 paragraph | 3 sentence 3), which a portable program should avoid. | Which could be easily withdrawn by using addition, ie instead of (1<<8) we will use (1<<7)+(1<<7). Thanks for comments! -- Cyrill |