From c1439d2cd855b80c5a4df5562df78281a3d9d98e Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Tue, 15 Jul 1997 20:02:05 +0000 Subject: [PATCH] changed asn1_locl.h to gen_locl.h and der_locl.h git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2328 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/asn1/der_copy.c | 2 +- lib/asn1/der_free.c | 2 +- lib/asn1/der_get.c | 2 +- lib/asn1/der_length.c | 2 +- lib/asn1/der_locl.h | 21 +++++++++++++++++++++ lib/asn1/der_put.c | 4 +--- lib/asn1/gen.c | 2 +- lib/asn1/gen_copy.c | 2 +- lib/asn1/gen_decode.c | 15 +++++++++------ lib/asn1/gen_encode.c | 2 +- lib/asn1/gen_free.c | 2 +- lib/asn1/gen_length.c | 2 +- lib/asn1/gen_locl.h | 38 ++++++++++++++++++++++++++++++++++++++ lib/asn1/gen_maybe.c | 2 +- lib/asn1/hash.c | 2 +- lib/asn1/main.c | 2 +- lib/asn1/parse.y | 2 +- lib/asn1/symbol.c | 2 +- lib/asn1/timegm.c | 2 +- 19 files changed, 84 insertions(+), 24 deletions(-) create mode 100644 lib/asn1/der_locl.h create mode 100644 lib/asn1/gen_locl.h diff --git a/lib/asn1/der_copy.c b/lib/asn1/der_copy.c index 5dfe87002..214fa7ca6 100644 --- a/lib/asn1/der_copy.c +++ b/lib/asn1/der_copy.c @@ -1,4 +1,4 @@ -#include "libasn1.h" +#include "der_locl.h" RCSID("$Id$"); diff --git a/lib/asn1/der_free.c b/lib/asn1/der_free.c index 7f4d87729..25c568366 100644 --- a/lib/asn1/der_free.c +++ b/lib/asn1/der_free.c @@ -1,4 +1,4 @@ -#include "libasn1.h" +#include "der_locl.h" RCSID("$Id$"); diff --git a/lib/asn1/der_get.c b/lib/asn1/der_get.c index 4f2f6ac4b..23ac712fd 100644 --- a/lib/asn1/der_get.c +++ b/lib/asn1/der_get.c @@ -1,4 +1,4 @@ -#include "libasn1.h" +#include "der_locl.h" RCSID("$Id$"); diff --git a/lib/asn1/der_length.c b/lib/asn1/der_length.c index 141b75024..5e7408535 100644 --- a/lib/asn1/der_length.c +++ b/lib/asn1/der_length.c @@ -1,4 +1,4 @@ -#include "libasn1.h" +#include "der_locl.h" RCSID("$Id$"); diff --git a/lib/asn1/der_locl.h b/lib/asn1/der_locl.h new file mode 100644 index 000000000..58ea04351 --- /dev/null +++ b/lib/asn1/der_locl.h @@ -0,0 +1,21 @@ +/* $Id$ */ + +#ifndef __DER_LOCL_H__ +#define __DER_LOCL_H__ + +#ifdef HAVE_CONFIG_H +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#endif /* __DER_LOCL_H__ */ diff --git a/lib/asn1/der_put.c b/lib/asn1/der_put.c index c177520c6..6c1efdcba 100644 --- a/lib/asn1/der_put.c +++ b/lib/asn1/der_put.c @@ -1,6 +1,4 @@ -/* $Id$ */ - -#include "libasn1.h" +#include "der_locl.h" RCSID("$Id$"); diff --git a/lib/asn1/gen.c b/lib/asn1/gen.c index 0672c5095..822a1c660 100644 --- a/lib/asn1/gen.c +++ b/lib/asn1/gen.c @@ -1,4 +1,4 @@ -#include "asn1_locl.h" +#include "gen_locl.h" RCSID("$Id$"); diff --git a/lib/asn1/gen_copy.c b/lib/asn1/gen_copy.c index 3fbd357a5..aa6ebc300 100644 --- a/lib/asn1/gen_copy.c +++ b/lib/asn1/gen_copy.c @@ -1,4 +1,4 @@ -#include "asn1_locl.h" +#include "gen_locl.h" RCSID("$Id$"); diff --git a/lib/asn1/gen_decode.c b/lib/asn1/gen_decode.c index fa1fa83bc..ac5886192 100644 --- a/lib/asn1/gen_decode.c +++ b/lib/asn1/gen_decode.c @@ -1,4 +1,4 @@ -#include "asn1_locl.h" +#include "gen_locl.h" RCSID("$Id$"); @@ -139,8 +139,8 @@ decode_type (char *name, Type *t) decode_type (s, m->type); fprintf (codefile, "if(dce_fix){\n" - "e = der_match_tag_and_length (p, len, 0, 0, 0, " - "&reallen, &l);\n" + "e = der_match_tag_and_length (p, len, " + "(Der_class)0, (Der_type)0, 0, &reallen, &l);\n" "FORW;\n" "}else \n" "len = oldlen - newlen;\n" @@ -155,7 +155,8 @@ decode_type (char *name, Type *t) } fprintf(codefile, "if(dce_fix){\n" - "e = der_match_tag_and_length (p, len, 0, 0, 0, &reallen, &l);\n" + "e = der_match_tag_and_length (p, len, " + "(Der_class)0, (Der_type)0, 0, &reallen, &l);\n" "FORW;\n" "}\n" "}\n"); @@ -206,7 +207,8 @@ decode_type (char *name, Type *t) decode_type (name, t->subtype); fprintf(codefile, "if(dce_fix){\n" - "e = der_match_tag_and_length (p, len, 0, 0, 0, &reallen, &l);\n" + "e = der_match_tag_and_length (p, len, " + "(Der_class)0, (Der_type)0, 0, &reallen, &l);\n" "FORW;\n" "}\n" "}\n"); @@ -315,7 +317,8 @@ generate_seq_type_decode (Symbol *s) "ret += l;\n" "if (dce_fix) {\n" "size_t reallen;\n\n" - "e = der_match_tag_and_length(p, len, 0, 0, 0, &reallen, &l);\n" + "e = der_match_tag_and_length(p, len, " + "(Der_class)0, (Der_type)0, 0, &reallen, &l);\n" "if (e)\n" "return e;\n" "ret += l;\n" diff --git a/lib/asn1/gen_encode.c b/lib/asn1/gen_encode.c index 4efeb5b4d..f635fbce1 100644 --- a/lib/asn1/gen_encode.c +++ b/lib/asn1/gen_encode.c @@ -1,4 +1,4 @@ -#include "asn1_locl.h" +#include "gen_locl.h" RCSID("$Id$"); diff --git a/lib/asn1/gen_free.c b/lib/asn1/gen_free.c index d32d8fcbd..8e4e52684 100644 --- a/lib/asn1/gen_free.c +++ b/lib/asn1/gen_free.c @@ -1,4 +1,4 @@ -#include "asn1_locl.h" +#include "gen_locl.h" RCSID("$Id$"); diff --git a/lib/asn1/gen_length.c b/lib/asn1/gen_length.c index ed1b9a78a..12a08e8c7 100644 --- a/lib/asn1/gen_length.c +++ b/lib/asn1/gen_length.c @@ -1,4 +1,4 @@ -#include "asn1_locl.h" +#include "gen_locl.h" RCSID("$Id$"); diff --git a/lib/asn1/gen_locl.h b/lib/asn1/gen_locl.h new file mode 100644 index 000000000..5215604c8 --- /dev/null +++ b/lib/asn1/gen_locl.h @@ -0,0 +1,38 @@ +/* $Id$ */ + +#ifndef __GEN_LOCL_H__ +#define __GEN_LOCL_H__ + +#ifdef HAVE_CONFIG_H +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "hash.h" +#include "symbol.h" + +void generate_type (Symbol *); +void generate_constant (Symbol *); +void generate_type_encode (Symbol *s); +void generate_type_decode (Symbol *s); +void generate_seq_type_decode (Symbol *s); +void generate_type_free (Symbol *s); +void generate_type_length (Symbol *s); +void generate_type_copy (Symbol *s); +void generate_type_maybe (Symbol *s); + +void init_generate (char *filename); +void close_generate(void); +int yyparse(void); + +extern FILE *headerfile, *codefile, *logfile; + +#endif /* __GEN_LOCL_H__ */ diff --git a/lib/asn1/gen_maybe.c b/lib/asn1/gen_maybe.c index adba64789..89cb2d157 100644 --- a/lib/asn1/gen_maybe.c +++ b/lib/asn1/gen_maybe.c @@ -1,4 +1,4 @@ -#include "asn1_locl.h" +#include "gen_locl.h" RCSID("$Id$"); diff --git a/lib/asn1/hash.c b/lib/asn1/hash.c index 537404d07..43eb0eeb1 100644 --- a/lib/asn1/hash.c +++ b/lib/asn1/hash.c @@ -2,7 +2,7 @@ * Hash table functions */ -#include "asn1_locl.h" +#include "gen_locl.h" RCSID("$Id$"); diff --git a/lib/asn1/main.c b/lib/asn1/main.c index 46e99e55c..f472786e0 100644 --- a/lib/asn1/main.c +++ b/lib/asn1/main.c @@ -1,4 +1,4 @@ -#include "asn1_locl.h" +#include "gen_locl.h" RCSID("$Id$"); diff --git a/lib/asn1/parse.y b/lib/asn1/parse.y index b4b468c10..e1fb1e3ca 100644 --- a/lib/asn1/parse.y +++ b/lib/asn1/parse.y @@ -9,7 +9,7 @@ #include #include "symbol.h" #include "lex.h" -#include "asn1_locl.h" +#include "gen_locl.h" RCSID("$Id$"); diff --git a/lib/asn1/symbol.c b/lib/asn1/symbol.c index dd370b538..a04b61764 100644 --- a/lib/asn1/symbol.c +++ b/lib/asn1/symbol.c @@ -1,4 +1,4 @@ -#include "asn1_locl.h" +#include "gen_locl.h" RCSID("$Id$"); diff --git a/lib/asn1/timegm.c b/lib/asn1/timegm.c index 3374e04ab..e279a04fb 100644 --- a/lib/asn1/timegm.c +++ b/lib/asn1/timegm.c @@ -1,4 +1,4 @@ -#include "asn1_locl.h" +#include "der_locl.h" RCSID("$Id$");