rem: ((unsigned char *) r)[0] = (bits >> 4) & 255; ((unsigned char *) r)[1] = (bits >> 8) & 255; ((unsigned char *) r)[2] = bits & 255;
add: r[0] = (bits >> 4) & 255; r[1] = (bits >> 8) & 255; r[2] = bits & 255;
context: fillpattern (int type, unsigned char *r, size_t size){  size_t i;  unsigned bits = type & 0xfff;  bits |= bits << 12;  ((unsigned char *) r)[0] = (bits >> 4) & 255;  ((unsigned char *) r)[1] = (bits >> 8) & 255;  ((unsigned char *) r)[2] = bits & 255;  for (i = 3; i < size / 2; i *= 2)    memcpy ((char *) r + i, (char *) r, i);  if (i < size)    memcpy ((char *) r + i, (char *) r, size - i);  /* Invert the first bit of every 512-byte sector. */  if (type & 0x1000)    for (i = 0; i < size; i += 512)      r[i] ^= 0x80;}