Stefan Knoblich 85e2eaaf58 FreeTDM: Fix "ftdm core flags/spanflags" with flag names
"x >> 1" is _NOT_ the reverse of "1 << x"...

Use code from Sean Eron Andersen's "Bit Twiddling Hacks"
(=> http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog)
to compute the log2 value (= position in the enum) of the bitflag.

This preserves the current behaviour, which is rather odd because
it is based on the position of the value in the enum, not its
actual (bit flag) value.

Signed-off-by: Stefan Knoblich <stkn@openisdn.net>
2013-06-01 22:30:45 +02:00
..
2010-11-01 02:13:27 +01:00
2011-03-06 22:11:39 -05:00
2011-03-17 08:34:00 -05:00
2010-10-06 17:51:29 -03:00
2011-03-11 17:36:42 -05:00
2010-09-30 17:58:25 -04:00
2011-01-21 10:51:34 -05:00

FreeTDM
http://wiki.freeswitch.org/wiki/FreeTDM