Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

simple riddle about macro

Name: Anonymous 2011-05-18 16:01

Bellow is a macro from Perl source code (perl.h).

# define _swab_32_(x) ((U32)( \
         (((U32)(x) & U32_CONST(0x000000ff)) << 24) | \
         (((U32)(x) & U32_CONST(0x0000ff00)) <<  8) | \
         (((U32)(x) & U32_CONST(0x00ff0000)) >>  8) | \
         (((U32)(x) & U32_CONST(0xff000000)) >> 24) ))


Provide at least 3 ideas, how this may be reused in other projects.

Name: Anonymous 2011-05-18 17:15

>>10
In Lisp I'll have no need for "(U32)(x)) & U32_CONST(" and I'll autogen swab_16 swab_32 swab_64, 128, 256,...

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List