_to_buffer(<span class="keywordtype">int</span> item)
{
  printf(<span class="stringliteral">"Item %d added to buffer at place %d\n"</span>, item, bufptr);  
  buffer[bufptr] = item;
  bufptr = (bufptr + 1) % BUFSIZE;
}
<span class="keyword">static</span> <span class="keywordtype">int</span>
get_from_buffer(<span class="keywordtype">void</span>)
{
  <span class="keywordtype">int</span> item;
  item = buffer[bufptr];
  printf(<span class="stringliteral">"Item %d retrieved from buffer at place %d\n