Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

fstream.c File Reference

File stream functions. More...

#include <sw.h>
#include <fstream.h>
#include <hal.h>
#include <types.h>

Functions

bool fstream_read (S_FSTREAM *fs, iu8 *dst, iu8 len)
 Read data from a stream. More...

bool fstream_write (S_FSTREAM *fs, iu8 *src, iu8 len)
 Write data to a stream. More...

bool fstream_test (S_FSTREAM *fs, iu16 len)
 This function tests, if enough space is available to read or write len bytes. More...


Detailed Description

File stream functions.

Id:
fstream.c,v 1.11 2002/12/22 15:42:55 m Exp


Function Documentation

bool fstream_read S_FSTREAM   fs,
iu8   dst,
iu8    len
 

Read data from a stream.

Either this functions reads all data or nothing.

Parameters:
fs  Pointer to S_FSTREAM, on which it should be operated.
dst  Pointer to the data destination.
len  Length of the data
Return values:
TRUE  on success.
FALSE  on failure. Error code given in sw.

bool fstream_test S_FSTREAM   fs,
iu16    len
 

This function tests, if enough space is available to read or write len bytes.

Parameters:
fs  Pointer to S_FSTREAM, on which it should be operated.
len  Length of the data
Return values:
TRUE  on success.
FALSE  on failure. Error code given in sw.

bool fstream_write S_FSTREAM   fs,
iu8   src,
iu8    len
 

Write data to a stream.

This functions tries to write all or nothing.

Parameters:
fs  Pointer to S_FSTREAM, on which it should be operated.
src  Pointer to data source.
len  Length of the data
Return values:
TRUE  on success.
FALSE  on failure. Error code given in sw.


Copyright 2002 by Matthias Bruestle. This is licensed under the GNU General Public License.