First kick.
[yaz-moved-to-github.git] / odr / odr_seq.c
1 /*
2  * Copyright (C) 1994, Index Data I/S 
3  * All rights reserved.
4  * Sebastian Hammer, Adam Dickmeiss
5  *
6  * $Log: odr_seq.c,v $
7  * Revision 1.1  1995-02-02 16:21:54  quinn
8  * First kick.
9  *
10  */
11
12 #include <odr.h>
13
14 int odr_sequence_begin(ODR o, void *p, int size)
15 {
16     char **pp = (char**) p;
17
18     if (o->t_class < 0)
19     {
20         o->t_class = ODR_UNIVERSAL;
21         o->t_tag = ODR_SEQUENCE;
22     }
23
24     if (odr_constructed_begin(o, p, o->t_class, o->t_tag, 0))
25     {
26         if (o->direction == ODR_DECODE)
27             *pp = nalloc(o, size);
28         return 1;
29     }
30     else
31         return 0;
32 }
33
34 int odr_sequence_end(ODR o)
35 {
36     return odr_constructed_end(o);    
37 }