~ubuntu-branches/ubuntu/precise/ncbi-tools6/precise

« back to all changes in this revision

Viewing changes to asnlib/asndebin.c

  • Committer: Bazaar Package Importer
  • Author(s): Aaron M. Ucko
  • Date: 2005-03-27 12:00:15 UTC
  • mfrom: (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050327120015-embhesp32nj73p9r
Tags: 6.1.20041020-3
* Fix FTBFS under GCC 4.0 caused by inconsistent use of "static" on
  functions.  (Closes: #295110.)
* Add a watch file, now that we can.  (Upstream's layout needs version=3.)

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
*
30
30
* Version Creation Date: 3/4/91
31
31
*
32
 
* $Revision: 6.4 $
 
32
* $Revision: 6.7 $
33
33
*
34
34
* File Description:
35
35
*   Special binary form (BER) decoder for ASN.1
45
45
* 08-01-93 Gish        AsnDeBinReadString calls MemGet instead of MemNew
46
46
*
47
47
* $Log: asndebin.c,v $
 
48
* Revision 6.7  2004/04/01 13:43:05  lavr
 
49
* Spell "occurred", "occurrence", and "occurring"
 
50
*
 
51
* Revision 6.6  2003/12/10 15:41:19  sirotkin
 
52
* As per toolkit RT request 15030485 and Jim Ostell, afety checks after ato2=AsnFindBaseIsa(atp) were added.
 
53
*
 
54
* Revision 6.5  2002/10/09 19:16:31  ivanov
 
55
* Fixed buffer overrun in the AsnDeBinReadReal()
 
56
*
48
57
* Revision 6.4  2000/12/12 15:56:10  ostell
49
58
* added support BigInt
50
59
*
115
124
 
116
125
                if (used == ASNDEBIN_EOF)      /* end of file */
117
126
                        return NULL;
 
127
                /* see RT toolbox ticket 15030485 for the below fix */
118
128
 
119
129
                atp2 = AsnFindBaseType(atp);   /* find the base type */
120
 
                if (atp2 == NULL) return NULL;
 
130
                if (atp2 == NULL)
 
131
                        return atp2;
 
132
                if (atp2->type == NULL)
 
133
                        return atp2->type;
 
134
                isa = atp2->type->isa;
 
135
 
121
136
 
122
137
                if (atp2->type->isa != CHOICE_TYPE)
123
138
                {
527
542
*       returns START_STRUCT
528
543
*               END_STRUCT
529
544
*                       1 if ok
530
 
*                       0 if an error occured
 
545
*                       0 if an error occurred
531
546
*       if (valueptr == NULL)
532
547
*               just checks that value is of proper type
533
548
*
1200
1215
        Int4 len;
1201
1216
        Int2 bytes, amount;
1202
1217
        BytePtr bp;
1203
 
        char buf[30], *tmp;
 
1218
        char buf[200], *tmp;
1204
1219
 
1205
1220
        aip->tagsaved = FALSE;
1206
1221
        len = aip->length;