Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

fstream.h File Reference

File stream declarations. More...

#include <types.h>

Go to the source code of this file.

Data Structures

struct  s_fstream
 Stream struct. More...


Typedefs

typedef s_fstream S_FSTREAM
 Stream struct. More...


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 declarations.

These streams are used to pass more easily EEPROM areas around and to reduce the chances of overwriting unwanted EEPROM areas, e.g. by overflowing the data area.

This is a very slim version of the streams implemented in cryptlib from Peter Gutmann.

Id:
fstream.h,v 1.8 2002/12/22 15:42:55 m Exp


Typedef Documentation

typedef struct s_fstream S_FSTREAM
 

Stream struct.


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.