Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

buffer.c File Reference

utility routines for "buffer management". More...

#include "common.h"
#include "buffer.h"
#include "xmalloc.h"

Include dependency graph for buffer.c:

Include dependency graph

Go to the source code of this file.

Functions

Buffer bufInit (char *data, size_t len, size_t pos)
 creates and returns struct Buffer buffer control block. More...

BufferbufpInit (char *data, size_t len, size_t pos)
 creates and returns a pointer to a struct Buffer buffer control block. More...


Detailed Description

utility routines for "buffer management".

Definition in file buffer.c.


Function Documentation

struct Buffer bufInit char *    data,
size_t    len,
size_t    pos
 

creates and returns struct Buffer buffer control block.

Parameters:
data  start of buffer data
len  length of buffer
pos  current position in buffer, relative to "data"
bufInit is a trivial function that aids in filling out a struct Buffer. It's main purpose is to be able to create a new buffer within a function call.

Returns:
a struct Buffer with all the given values filled in

Definition at line 29 of file buffer.c.

struct Buffer* bufpInit char *    data,
size_t    len,
size_t    pos
 

creates and returns a pointer to a struct Buffer buffer control block.

Parameters:
data  start of buffer data
len  length of buffer
pos  current position in buffer, relative to "data"
bufInit is a trivial function that aids in filling out a struct Buffer. It's main purpose is to malloc memory for a struct Buffer, fill it with data return a pointer to it.

Returns:
a pointer to a struct Buffer with all the given values filled in

Definition at line 40 of file buffer.c.


Generated on Fri Jan 25 22:40:32 2002 for PDepp Webserver by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001