C buffer data formats and manipulation functions used in RCT firmware projects