=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/telnet/ring.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- src/usr.bin/telnet/ring.h 2014/07/19 23:50:38 1.7 +++ src/usr.bin/telnet/ring.h 2014/07/20 06:24:19 1.8 @@ -1,4 +1,4 @@ -/* $OpenBSD: ring.h,v 1.7 2014/07/19 23:50:38 guenther Exp $ */ +/* $OpenBSD: ring.h,v 1.8 2014/07/20 06:24:19 guenther Exp $ */ /* $NetBSD: ring.h,v 1.5 1996/02/28 21:04:09 thorpej Exp $ */ /* @@ -43,42 +43,36 @@ * */ typedef struct { - unsigned char *consume, /* where data comes out of */ - *supply, /* where data comes in to */ - *bottom, /* lowest address in buffer */ - *top, /* highest address+1 in buffer */ - *mark; /* marker (user defined) */ - int size; /* size in bytes of buffer */ - u_long consumetime, /* help us keep straight full, empty, etc. */ - supplytime; + unsigned char *consume; /* where data comes out of */ + unsigned char *supply; /* where data comes in to */ + unsigned char *bottom; /* lowest address in buffer */ + unsigned char *top; /* highest address+1 in buffer */ + unsigned char *mark; /* marker (user defined) */ + int size; /* size in bytes of buffer */ + u_long consumetime; /* help us keep straight full, empty, etc. */ + u_long supplytime; } Ring; /* Here are some functions and macros to deal with the ring buffer */ /* Initialization routine */ -extern int - ring_init(Ring *ring, unsigned char *buffer, int count); +void ring_init(Ring *ring, unsigned char *buffer, int size); /* Data movement routines */ -extern void - ring_supply_data(Ring *ring, unsigned char *buffer, int count); +void ring_supply_data(Ring *ring, unsigned char *buffer, int count); /* Buffer state transition routines */ -extern void - ring_supplied(Ring *ring, int count), - ring_consumed(Ring *ring, int count); +void ring_supplied(Ring *ring, int count); +void ring_consumed(Ring *ring, int count); /* Buffer state query routines */ -extern int - ring_empty_count(Ring *ring), - ring_empty_consecutive(Ring *ring), - ring_full_count(Ring *ring), - ring_full_consecutive(Ring *ring); +int ring_empty_count(Ring *ring); +int ring_empty_consecutive(Ring *ring); +int ring_full_count(Ring *ring); +int ring_full_consecutive(Ring *ring); -extern void - ring_clear_mark(Ring *), - ring_mark(Ring *); +/* Buffer urgent data handling */ +void ring_clear_mark(Ring *); +void ring_mark(Ring *); +int ring_at_mark(Ring *); - -extern int - ring_at_mark(Ring *);