* based swap(smallint) and swap(word) on swapendian(smallint/word),
since the same bug was already fixed in swap(smallint) in r6752
(so these routines now share the same code)
* fixed potential range error in swapendian(word)
+ added basic test for the above four routines
git-svn-id: trunk@10840 -