src/internal/utils/kitringbuffer.c
int Kit_AdvanceRingBuffer(Kit_RingBuffer *rb, int len) {
    len = (len > rb->len) ? rb->len : len;
    if(rb->len > 0) {
        rb->len -= len;
        rb->rpos += len;
        if(rb->rpos >= rb->size) {
            rb->rpos = rb->rpos % rb->size;
        }
        return len;
    }
    return 0;
}
/**
  * Advances the internal position counter by given amount. Note that counter can only be
  * advanced by the amount of unreadable data in ringbuffer.
  * @param rb Ringbuffer to handle
  * @param len How much should the position counter be increased
  * @return How much the position counter was actually increased.
  */
Advances the internal position counter by given amount. Note that counter can only be
advanced by the amount of unreadable data in ringbuffer.
@param rb Ringbuffer to handle
@param len How much should the position counter be increased
@return How much the position counter was actually increased.
Advances the internal position counter by given amount . Note that counter can only be advanced by the amount of unreadable data in ringbuffer . @param rb Ringbuffer to handle @param len How much should the position counter be increased @return How much the position counter was actually increased .
int Kit_AdvanceRingBuffer(Kit_RingBuffer *rb, int len) {
    len = (len > rb->len) ? rb->len : len;
    if(rb->len > 0) {
        rb->len -= len;
        rb->rpos += len;
        if(rb->rpos >= rb->size) {
            rb->rpos = rb->rpos % rb->size;
        }
        return len;
    }
    return 0;
}
int Kit_AdvanceRingBuffer ( Kit_RingBuffer * rb , int len ) { len = ( len > rb -> len ) ? rb -> len : len ; if ( rb -> len > 0 ) { rb -> len -= len ; rb -> rpos += len ; if ( rb -> rpos >= rb -> size ) { rb -> rpos = rb -> rpos % rb -> size ; } return len ; } return 0 ; }
Advances the internal position counter by given amount.
Advances the internal position counter by given amount .