Circular buffer in c problem

I am not sure I posted this in the right place so here is a link to my topic: