From 250e223a20b25e6821ac0a68ea6f7c2372184149 Mon Sep 17 00:00:00 2001 From: ehouse Date: Sat, 19 Sep 2009 21:28:07 +0000 Subject: [PATCH] add bqRemoveAll --- xwords4/common/bufqueue.c | 6 ++++++ xwords4/common/bufqueue.h | 1 + 2 files changed, 7 insertions(+) diff --git a/xwords4/common/bufqueue.c b/xwords4/common/bufqueue.c index 83359b579..33d9cd216 100644 --- a/xwords4/common/bufqueue.c +++ b/xwords4/common/bufqueue.c @@ -120,6 +120,12 @@ bqRemoveOne( BufQueue* bq ) } } +void +bqRemoveAll( BufQueue* bq ) +{ + bq->head = bq->tail = 0; +} + #ifdef CPLUS } #endif diff --git a/xwords4/common/bufqueue.h b/xwords4/common/bufqueue.h index ed6f0f87a..32dac0d7c 100644 --- a/xwords4/common/bufqueue.h +++ b/xwords4/common/bufqueue.h @@ -37,6 +37,7 @@ void bqInit( BufQueue* bq, XP_U8* buf, XP_U16 buflen ); XP_Bool bqAdd( BufQueue* bq, const XP_U8* buf, XP_U16 len ); XP_Bool bqGet( BufQueue* bq, const XP_U8** buf, XP_U16* len ); void bqRemoveOne( BufQueue* bq ); +void bqRemoveAll( BufQueue* bq ); #ifdef CPLUS }