/**********************************************************************
 
	Copyright (C) 2003 Hirohisa MORI <joshua@nichibun.ac.jp>
 
	This program is free software; you can redistribute it 
	and/or modify it under the terms of the GLOBALBASE 
	Library General Public License (G-LGPL) as published by 

	http://www.globalbase.org/
 
	This program is distributed in the hope that it will be 
	useful, but WITHOUT ANY WARRANTY; without even the 
	implied warranty of MERCHANTABILITY or FITNESS FOR A 
	PARTICULAR PURPOSE.

**********************************************************************/



#ifndef ___S_BUF_H___
#define ___S_BUF_H___


int en_do(int * ret_len,int (*func)(),STREAM * s,void * data,int len);

void init_sbuf(STREAM_BUF *,SEM lock);
void free_sbuf(STREAM_BUF *,SEM lock);
int copy_in_sbuf_stream(STREAM_BUF *,STREAM *,int,SEM lock); 
void copy_in_sbuf(STREAM_BUF *,void *,int,SEM lock);
int copy_out_sbuf(STREAM_BUF *,void * data,int size,SEM lock);
int get_sbuf_data_size(STREAM_BUF * b,SEM lock);
SBUF_DATA * get_sbuf_head(STREAM_BUF *b,SEM lock);


#endif

