src/lib/ppc405lib/string_stream.c
// For simplicity (and ease of maintainence) we create a normal string stream
// then overwrite a few key fields.
For simplicity (and ease of maintainence) we create a normal string stream
then overwrite a few key fields.
For simplicity ( and ease of maintainence ) we create a normal string stream then overwrite a few key fields .
int
input_stream_create(StringStream* stream, void* buf, size_t size, int flags)
{
    int rc;
    rc = _string_stream_create(stream, buf, size, flags, 0);
    if (!rc) {
        stream->stream.sread = input_stream_sread;
        stream->stream.fflush = 0;
        stream->flags = STRING_STREAM_FULL;
    }
    return rc;
}
int input_stream_create ( StringStream * stream , void * buf , size_t size , int flags ) { int rc ; rc = _string_stream_create ( stream , buf , size , flags , 0 ) ; if ( ! rc ) { stream -> stream . sread = input_stream_sread ; stream -> stream . fflush = 0 ; stream -> flags = STRING_STREAM_FULL ; } return rc ; }
For simplicity (and ease of maintainence) we create a normal string stream
then overwrite a few key fields.
For simplicity ( and ease of maintainence ) we create a normal string stream then overwrite a few key fields .