RngLib

From ProjectWiki
(Difference between revisions)
Jump to: navigation, search
(New page: ==What is this?== rngBuf.h - an implementation of vxWorks style ring bufs stubby article ==Functions== <source lang="c"> int rngNBytes(RING_ID ringId); //rngNBytes( ) - determine the num...)
 
Line 41: Line 41:
 
#define RNG_ELEM_GET(r,p,f)
 
#define RNG_ELEM_GET(r,p,f)
 
</source>
 
</source>
 +
 +
[[Category:NDS]]
 +
[[Category:C]]
 +
[[Category:LIBTHDS]]

Revision as of 22:20, 13 August 2008

What is this?

rngBuf.h - an implementation of vxWorks style ring bufs

stubby article

Functions

int rngNBytes(RING_ID ringId);	//rngNBytes( ) - determine the number of bytes in a ring buffer
 
RING_ID rngCreate(int nbytes);	//
void rngDelete(RING_ID ringId);
void rngFlush(RING_ID ringId);
int rngBufGet(RING_ID rngId, char *buffer, int maxbytes);
int rngBufPut(RING_ID rngId, char *buffer, int nbytes);
bool rngIsEmpty(RING_ID ringId);
bool rngIsFull(RING_ID ringId);
int rngFreeBytes(RING_ID ringId);
int rngNBytes(RING_ID ringId);
void rngPutAhead(RING_ID ringId, char byte, int offset);
void rngMoveAhead(RING_ID ringId, int n);

Macros

// RNG_ELEM_PUT - put one character into a ring buffer
 
//(register int) 't'.
// c is a char
 
// returns 1 if success 0 if not
#define RNG_ELEM_PUT(r, c, t)
// RNG_ELEM_GET - get one character from a ring buffer
// p should be a char *
 
// (register int) 'f'.
 
// returns 1 if success 0 if not
#define RNG_ELEM_GET(r,p,f)
Personal tools
irssi scripts
eggdrop scripts