defs.h revision 1.1 1 1.1 phil /* $NetBSD: defs.h,v 1.1 1997/09/26 21:16:38 phil Exp $ */
2 1.1 phil
3 1.1 phil /*
4 1.1 phil * Copyright 1997 Piermont Information Systems Inc.
5 1.1 phil * All rights reserved.
6 1.1 phil *
7 1.1 phil * Written by Philip A. Nelson for Piermont Information Systems Inc.
8 1.1 phil *
9 1.1 phil * Redistribution and use in source and binary forms, with or without
10 1.1 phil * modification, are permitted provided that the following conditions
11 1.1 phil * are met:
12 1.1 phil * 1. Redistributions of source code must retain the above copyright
13 1.1 phil * notice, this list of conditions and the following disclaimer.
14 1.1 phil * 2. Redistributions in binary form must reproduce the above copyright
15 1.1 phil * notice, this list of conditions and the following disclaimer in the
16 1.1 phil * documentation and/or other materials provided with the distribution.
17 1.1 phil * 3. All advertising materials mentioning features or use of this software
18 1.1 phil * must display the following acknowledgement:
19 1.1 phil * This product includes software develooped for the NetBSD Project by
20 1.1 phil * Piermont Information Systems Inc.
21 1.1 phil * 4. The name of Piermont Information Systems Inc. may not be used to endorse
22 1.1 phil * or promote products derived from this software without specific prior
23 1.1 phil * written permission.
24 1.1 phil *
25 1.1 phil * THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
26 1.1 phil * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 1.1 phil * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 1.1 phil * ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
29 1.1 phil * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30 1.1 phil * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31 1.1 phil * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 1.1 phil * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 1.1 phil * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 1.1 phil * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
35 1.1 phil * THE POSSIBILITY OF SUCH DAMAGE.
36 1.1 phil *
37 1.1 phil */
38 1.1 phil
39 1.1 phil /* defs.h: definitions needed for the message system. */
40 1.1 phil
41 1.1 phil #include <stdio.h>
42 1.1 phil #include "msgdb.h"
43 1.1 phil
44 1.1 phil #ifdef MAIN
45 1.1 phil #define EXTERN
46 1.1 phil #define INIT(x) = x
47 1.1 phil #else
48 1.1 phil #define EXTERN extern
49 1.1 phil #define INIT(x)
50 1.1 phil #endif
51 1.1 phil
52 1.1 phil /* some constants */
53 1.1 phil #define TRUE 1
54 1.1 phil #define FALSE 0
55 1.1 phil
56 1.1 phil /* Global variables .. to be defined in main.c, extern elsewhere. */
57 1.1 phil
58 1.1 phil EXTERN char *prog_name;
59 1.1 phil EXTERN char *src_name;
60 1.1 phil EXTERN char *out_name INIT("msg_defs");
61 1.1 phil EXTERN char *sys_name INIT("msg_sys.def");
62 1.1 phil
63 1.1 phil EXTERN int line_no INIT(1);
64 1.1 phil EXTERN int had_errors INIT(FALSE);
65 1.1 phil EXTERN int max_strlen INIT(1);
66 1.1 phil
67 1.1 phil EXTERN id_rec *root INIT(NULL);
68 1.1 phil
69 1.1 phil /* Prototypes. */
70 1.1 phil
71 1.1 phil /* From util.c */
72 1.1 phil void yyerror (const char *, ...);
73 1.1 phil void buff_add_ch (char);
74 1.1 phil char *buff_copy (void);
75 1.1 phil
76 1.1 phil /* From avl.c */
77 1.1 phil id_rec *find_id (id_rec *tree, char *id);
78 1.1 phil int insert_id (id_rec **root, id_rec *new_id);
79 1.1 phil
80 1.1 phil /* from scan.l */
81 1.1 phil int yylex (void);
82 1.1 phil
83 1.1 phil /* from parse.y */
84 1.1 phil int yyparse (void);
85 1.1 phil
86 1.1 phil /* Vars not defined in main.c */
87 1.1 phil extern FILE *yyin;
88 1.1 phil
89 1.1 phil /* from mdb.c */
90 1.1 phil void define_msg (char *, char *);
91 1.1 phil void write_msg_file (void);
92 1.1 phil
93