Rewrite asn1_get_tag interface to use a structure pointer rather than several
authorKen Raeburn <raeburn@mit.edu>
Wed, 12 Mar 2003 04:33:30 +0000 (04:33 +0000)
committerKen Raeburn <raeburn@mit.edu>
Wed, 12 Mar 2003 04:33:30 +0000 (04:33 +0000)
commit6670198c5e4945eaabfec95e24b0c47c7d97fc44
tree787e044efe4a2b753259125c1920e27c4be605b3
parent9347b515ef987e4b1194fb7a03a7e1f8a6496670
Rewrite asn1_get_tag interface to use a structure pointer rather than several
pointer variables for the returned data.  Use the structure in the caller when
straightforward; in cases where macros use different but overlapping sets of
automatic scalar variables in one file, copy the values out of the structures
for now, until they can be analyzed more carefully.

* asn1_get.c (asn1_get_tag): Deleted.
(asn1_get_tag_2): Renamed from asn1_get_tag_indef, now uses a pointer to
taginfo rather than a bunch of pointer args.
(asn1_get_id, asn1_get_length): Folded into asn1_get_tag_2.
(asn1_get_sequence): Call asn1_get_tag_2.
* asn1_get.h (taginfo): New structure.
(asn1_get_tag_indef, asn1_get_tag, asn1_get_id, asn1_get_length): Declarations
deleted.
(asn1_get_tag_2): Declare.
* asn1_decode.c (setup): Declare only a taginfo variable.
(asn1class, construction, tagnum, length): New macros.
(tag): Call asn1_get_tag_2.
* asn1_k_decode.c (next_tag, get_eoc, apptag, end_sequence_of,
end_sequence_of_no_tagvars, asn1_decode_krb5_flags): Call asn1_get_tag_2; if no
error, copy out values into scalar variables.
(asn1_decode_ticket): Call asn1_get_tag_2.
* asn1buf.c (asn1buf_skiptail): Call asn1_get_tag_2.
* krb5_decode.c (check_apptag, next_tag, get_eoc): Call asn1_get_tag_2; if no
error, copy out values into scalar variables.
(decode_krb5_enc_kdc_rep_part): Call asn1_get_tag_2.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15274 dc483132-0cff-0310-8789-dd5450dbe970
src/lib/krb5/asn.1/ChangeLog
src/lib/krb5/asn.1/asn1_decode.c
src/lib/krb5/asn.1/asn1_get.c
src/lib/krb5/asn.1/asn1_get.h
src/lib/krb5/asn.1/asn1_k_decode.c
src/lib/krb5/asn.1/asn1buf.c
src/lib/krb5/asn.1/krb5_decode.c