annotate src/win32/7zip/7z/C/RotateDefs.h @ 6:458a4f18f3cd

working on lua generation
author Robert McIntyre <rlm@mit.edu>
date Sat, 03 Mar 2012 10:48:33 -0600
parents f9f4f1b99eed
children
rev   line source
rlm@1 1 /* RotateDefs.h -- Rotate functions
rlm@1 2 2008-08-05
rlm@1 3 Igor Pavlov
rlm@1 4 Public domain */
rlm@1 5
rlm@1 6 #ifndef __ROTATEDEFS_H
rlm@1 7 #define __ROTATEDEFS_H
rlm@1 8
rlm@1 9 #ifdef _MSC_VER
rlm@1 10
rlm@1 11 #include <stdlib.h>
rlm@1 12 #define rotlFixed(x, n) _rotl((x), (n))
rlm@1 13 #define rotrFixed(x, n) _rotr((x), (n))
rlm@1 14
rlm@1 15 #else
rlm@1 16
rlm@1 17 #define rotlFixed(x, n) (((x) << (n)) | ((x) >> (32 - (n))))
rlm@1 18 #define rotrFixed(x, n) (((x) >> (n)) | ((x) << (32 - (n))))
rlm@1 19
rlm@1 20 #endif
rlm@1 21
rlm@1 22 #endif