X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ucw%2Flib.h;h=e4352ee85d9e7a675262e839b15302a1e164b0c7;hb=37cb2d8a8f2ccd1441eb19cfcc8ce7179df5b490;hp=0dad3777b67a58815b26d2bc3ee16b2baaac8868;hpb=e8060fa4647c5c4ccf07efb91a35f65c543dfc4f;p=libucw.git diff --git a/ucw/lib.h b/ucw/lib.h index 0dad3777..e4352ee8 100644 --- a/ucw/lib.h +++ b/ucw/lib.h @@ -43,7 +43,8 @@ #define COMPARE_LT(x,y) do { if ((x)<(y)) return 1; if ((x)>(y)) return 0; } while(0) #define COMPARE_GT(x,y) COMPARE_LT(y,x) -#define ROL(x, bits) (((x) << (bits)) | ((x) >> (sizeof(uns)*8 - (bits)))) /* Bitwise rotation of an uns to the left */ +#define ROL(x, bits) (((x) << (bits)) | ((uns)(x) >> (sizeof(uns)*8 - (bits)))) /* Bitwise rotation of an uns to the left */ +#define ROR(x, bits) (((uns)(x) >> (bits)) | ((x) << (sizeof(uns)*8 - (bits)))) /* GCC Extensions */ @@ -148,16 +149,6 @@ void xfree(void *); void *xmalloc_zero(uns) LIKE_MALLOC; char *xstrdup(const char *) LIKE_MALLOC; -/* prime.c */ - -int isprime(uns x); -uns nextprime(uns x); - -/* primetable.c */ - -uns next_table_prime(uns x); -uns prev_table_prime(uns x); - /* timer.c */ timestamp_t get_timestamp(void);