gen.c revision f1b68725503ff3e46001eee5a1751e29a43a09d1
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Copyright (C) 1998-2001 Internet Software Consortium.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * Permission to use, copy, modify, and distribute this software for any
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * purpose with or without fee is hereby granted, provided that the above
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews * copyright notice and this permission notice appear in all copies.
be59d1eb72baa92baa74766a0a1ff4283e4e6ba5Scott Mann * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
be59d1eb72baa92baa74766a0a1ff4283e4e6ba5Scott Mann * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
be59d1eb72baa92baa74766a0a1ff4283e4e6ba5Scott Mann * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
be59d1eb72baa92baa74766a0a1ff4283e4e6ba5Scott Mann * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
2c089bf6d24936de631a57b4958ba6b8b5e3b23dMark Andrews * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
2c089bf6d24936de631a57b4958ba6b8b5e3b23dMark Andrews * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
2c089bf6d24936de631a57b4958ba6b8b5e3b23dMark Andrews * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
2c089bf6d24936de631a57b4958ba6b8b5e3b23dMark Andrews * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2c089bf6d24936de631a57b4958ba6b8b5e3b23dMark Andrews/* $Id: gen.c,v 1.67 2001/11/27 00:55:52 gson Exp $ */
00fb0253c9df8a4686115745ae91d501f62c7451Mark Andrews#define FROMTEXTARGS "rdclass, type, lexer, origin, downcase, target, callbacks"
be59d1eb72baa92baa74766a0a1ff4283e4e6ba5Scott Mann#define FROMWIREARGS "rdclass, type, source, dctx, downcase, target"
const char copyright[] =
" *************** THIS FILE IS AUTOMATICALLY GENERATED BY gen.c.\n"
struct cc {
int rdclass;
} *classes;
struct tt {
int rdclass;
int type;
} *types;
struct ttnam {
unsigned int sorted;
upper(char *);
funname(const char *, char *);
doswitch(const char *, const char *, const char *, const char *,
dodecl(char *, char *, char *);
add(int, const char *, int, const char *, const char *);
sd(int, const char *, const char *, char);
insert_into_typenames(int, const char *, const char *);
upper(char *s) {
static int buf_to_use = 0;
buf_to_use++;
buf_to_use = 0;
char *b = buf;
return (buf);
int lasttype = 0;
int subswitch = 0;
if (first) {
first = 0;
subswitch = 0;
if (subswitch) {
if (first) {
typename);
const char *dirname)
if (rdclass == 0)
int type;
int rdclass;
unsigned int hash;
int lasttype;
int class_enum = 0;
int type_enum = 0;
int structs = 0;
int depend = 0;
code = 0;
depend = 0;
type_enum = 0;
structs = 0;
code = 0;
class_enum = 0;
type_enum = 0;
structs = 0;
code = 0;
depend = 0;
class_enum = 0;
structs = 0;
code = 0;
depend = 0;
class_enum = 0;
type_enum = 0;
year[0] = 0;
year[0] = 0;
if (code) {
const char *attrs;
PRINT_COMMA(i));
} else if (type_enum) {
lasttype = 0;
} else if (class_enum) {
int classnum;
} else if (structs) {
} else if (depend) {