AfanasevGad7

This is a task for our favourite professor
git clone git://git.stellar-nexus.ru/AfanasevGad7
Log | Files | Refs

rb.h (293B)


      1 #define BLACK   0
      2 #define RED     1
      3 
      4 #define FCOLOR(n)       (((n)->val) & 1)
      5 #define COLOR(n)        ((n) && FCOLOR(n))
      6 #define SET_COLOR(n,c)  ((n)->val = (((n)->val) & ~1) | ((c) & 1))
      7 #define VALUE(n)        ((n)->val >> 1)
      8 #define SET_VALUE(n,v)  ((n)->val = ((v)<<1) | (((n)->val) & 1))