summaryrefslogtreecommitdiffstats
path: root/lib/keystroke.c
diff options
context:
space:
mode:
authorChris Hall <chris.hall@highwayman.com>2011-03-29 01:49:16 +0100
committerChris Hall <chris.hall@highwayman.com>2011-03-29 01:49:16 +0100
commitf9956b9524ddafdb9d0cec042213eaa8229aad8c (patch)
treebf362c892837ef3f5a6a4d4265eb18e1b47ccf33 /lib/keystroke.c
parent9470cb2c32eab220f796b1438b787528272cbe84 (diff)
downloadquagga-ex15p.tar.bz2
quagga-ex15p.tar.xz
Bring "ex" version up to date with 0.99.18ex15p
Release: 0.99.18ex15p -- Pipework Branch Also fixes issue with unknown attributes -- does not release them prematurely. Contains the "bgpd: New show commands for improved view and address family support", which is post 0.99.18. (But not RFC 5082 GTSM.)
Diffstat (limited to 'lib/keystroke.c')
-rw-r--r--lib/keystroke.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/keystroke.c b/lib/keystroke.c
index 8325b8f8..2b5d8128 100644
--- a/lib/keystroke.c
+++ b/lib/keystroke.c
@@ -19,8 +19,7 @@
* Boston, MA 02111-1307, USA.
*/
-#include <stdbool.h>
-#include <string.h>
+#include "misc.h"
#include "keystroke.h"
@@ -28,7 +27,6 @@
#include "memory.h"
#include "mqueue.h"
-#include "zassert.h"
/*==============================================================================
*/
@@ -274,7 +272,7 @@ typedef struct keystroke_state keystroke_state_t ;
struct keystroke_stream
{
- vio_fifo_t fifo ; /* the keystrokes -- embedded */
+ vio_fifo fifo ; /* the keystrokes */
keystroke_callback* iac_callback ;
void* iac_callback_context ;
@@ -373,7 +371,7 @@ keystroke_stream_new(uint8_t csi_char, keystroke_callback* iac_callback,
stream->iac_callback = iac_callback ;
stream->iac_callback_context = iac_callback_context ;
- vio_fifo_init_new(stream->fifo, keystroke_buffer_len) ;
+ stream->fifo = vio_fifo_new(keystroke_buffer_len) ;
stream->CSI = (csi_char != '\0') ? csi_char : 0x1B ;
@@ -390,7 +388,7 @@ keystroke_stream_free(keystroke_stream stream)
{
if (stream != NULL)
{
- vio_fifo_reset(stream->fifo, keep_it) ;
+ stream->fifo = vio_fifo_free(stream->fifo) ;
XFREE(MTYPE_KEY_STREAM, stream) ;
} ;
@@ -446,7 +444,7 @@ keystroke_stream_eof(keystroke_stream stream)
extern void
keystroke_stream_set_eof(keystroke_stream stream, bool timed_out)
{
- vio_fifo_reset(stream->fifo, keep_it) ;
+ vio_fifo_clear(stream->fifo, true) ; /* and clear marks */
stream->eof_met = true ; /* essential information */
stream->timed_out = timed_out ; /* variant of eof */