1 /* $NetBSD: gen_locl.h,v 1.1.1.2 2011/04/14 14:08:21 elric Exp $ */
4 * Copyright (c) 1997-2005 Kungliga Tekniska Högskolan
5 * (Royal Institute of Technology, Stockholm, Sweden).
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * 3. Neither the name of the Institute nor the names of its contributors
20 * may be used to endorse or promote products derived from this software
21 * without specific prior written permission.
23 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
24 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
38 #ifndef __GEN_LOCL_H__
39 #define __GEN_LOCL_H__
52 #include <krb5/roken.h>
55 #include <krb5/asn1-common.h>
57 #include "der-private.h"
59 void generate_type (const Symbol
*);
60 void generate_constant (const Symbol
*);
61 void generate_type_encode (const Symbol
*);
62 void generate_type_decode (const Symbol
*);
63 void generate_type_free (const Symbol
*);
64 void generate_type_length (const Symbol
*);
65 void generate_type_copy (const Symbol
*);
66 void generate_type_seq (const Symbol
*);
67 void generate_glue (const Type
*, const char*);
69 const char *classname(Der_class
);
70 const char *valuename(Der_class
, int);
72 void gen_compare_defval(const char *, struct value
*);
73 void gen_assign_defval(const char *, struct value
*);
76 void init_generate (const char *, const char *);
77 const char *get_filename (void);
78 void close_generate(void);
79 void add_import(const char *);
80 void add_export(const char *);
81 int is_export(const char *);
83 int is_primitive_type(int);
85 int preserve_type(const char *);
86 int seq_type(const char *);
88 void generate_header_of_codefile(const char *);
89 void close_codefile(void);
91 int is_template_compat (const Symbol
*);
92 void generate_template(const Symbol
*);
93 void gen_template_import(const Symbol
*);
96 extern FILE *privheaderfile
, *headerfile
, *codefile
, *logfile
, *templatefile
;
97 extern int support_ber
;
98 extern int template_flag
;
99 extern int rfc1510_bitstring
;
100 extern int one_code_file
;
102 extern int error_flag
;
104 #endif /* __GEN_LOCL_H__ */