~ubuntu-branches/ubuntu/breezy/libaal/breezy

« back to all changes in this revision

Viewing changes to src/stream.c

  • Committer: Bazaar Package Importer
  • Author(s): Domenico Andreoli
  • Date: 2005-02-25 18:50:30 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 hoary)
  • Revision ID: james.westby@ubuntu.com-20050225185030-9frto0bpm1f2elxd
Tags: 1.0.4-1
New upstream release. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
   
4
4
   stream.c -- stream implementation. */  
5
5
 
6
 
#ifndef ENABLE_STAND_ALONE
 
6
#ifndef ENABLE_MINIMAL
7
7
#include <stdio.h>
8
8
#include <stdlib.h>
9
9
#include <aal/libaal.h>
18
18
        if (!(stream = aal_calloc(sizeof(*stream), 0)))
19
19
                return NULL;
20
20
 
21
 
        return aal_stream_init(stream, entity, proto);
 
21
        aal_stream_init(stream, entity, proto);
 
22
        return stream;
22
23
}
23
24
 
24
 
aal_stream_t *aal_stream_init(aal_stream_t *stream,
25
 
                              void *entity, aal_proto_t *proto)
26
 
{
 
25
void aal_stream_init(aal_stream_t *stream, void *entity, aal_proto_t *proto) {
27
26
        aal_assert("umka-2640", proto != NULL);
28
27
        aal_assert("umka-1543", stream != NULL);
29
28
 
31
30
        stream->offset = 0;
32
31
        stream->proto = proto;
33
32
        stream->entity = entity;
34
 
        
35
 
        return stream;
36
33
}
37
34
 
38
35
void aal_stream_fini(aal_stream_t *stream) {