This function swaps n 32 bit words pointed by ptr converting between big and little endian or the other way around. If words were in little endian order, after treating with this function they are in big endian, and vice versa. You may want to look at macro YW_HOST_ENDIAN which evaluates to YW_LITTLE_ENDIAN or YW_BIG_ENDIAN, which are defined in <yw/config.h> file (included by all yw/*.h headers). Note that PDP endian is not supported (we're in XXI centry, you know :^).