Home | History | Annotate | Line # | Download | only in menuc
defs.h revision 1.10.26.1
      1  1.10.26.1  christos /*	$NetBSD: defs.h,v 1.10.26.1 2019/06/10 22:10:22 christos 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.9   mbalmer  * 3. The name of Piermont Information Systems Inc. may not be used to endorse
     18        1.1      phil  *    or promote products derived from this software without specific prior
     19        1.1      phil  *    written permission.
     20        1.1      phil  *
     21        1.1      phil  * THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
     22        1.1      phil  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     23        1.1      phil  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     24        1.1      phil  * ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
     25        1.1      phil  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     26        1.1      phil  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     27        1.1      phil  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     28        1.1      phil  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     29        1.1      phil  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     30        1.1      phil  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
     31        1.1      phil  * THE POSSIBILITY OF SUCH DAMAGE.
     32        1.1      phil  *
     33        1.1      phil  */
     34        1.1      phil 
     35        1.1      phil /* defs.h: definitions needed for the menu system. */
     36        1.5        tv 
     37        1.8     lukem #if HAVE_NBTOOL_CONFIG_H
     38        1.8     lukem #include "nbtool_config.h"
     39        1.5        tv #endif
     40        1.1      phil 
     41        1.1      phil #include <stdio.h>
     42        1.1      phil 
     43        1.1      phil #include "mdb.h"
     44        1.1      phil 
     45        1.1      phil #ifdef MAIN
     46        1.1      phil #define EXTERN
     47        1.1      phil #define INIT(x) = x
     48        1.1      phil #else
     49        1.1      phil #define EXTERN extern
     50        1.1      phil #define INIT(x)
     51        1.1      phil #endif
     52        1.1      phil 
     53       1.10  christos #ifndef TRUE
     54       1.10  christos #define TRUE	1
     55       1.10  christos #endif
     56       1.10  christos #ifndef FALSE
     57       1.10  christos #define FALSE	0
     58       1.10  christos #endif
     59        1.1      phil /* Global variables .. to be defined in main.c, extern elsewhere. */
     60        1.1      phil 
     61        1.1      phil EXTERN char *prog_name;
     62        1.1      phil EXTERN char *src_name;
     63        1.1      phil EXTERN char *out_name INIT("menu_defs");
     64        1.1      phil EXTERN char *sys_name INIT("menu_sys.def");
     65        1.1      phil 
     66        1.3      phil EXTERN int do_dynamic INIT(0);
     67        1.6       dsl EXTERN int do_msgxlat INIT(0);
     68  1.10.26.1  christos EXTERN int do_expands INIT(0);
     69        1.1      phil EXTERN int line_no INIT(1);
     70        1.1      phil EXTERN int had_errors INIT(FALSE);
     71        1.1      phil EXTERN int max_strlen INIT(1);
     72        1.1      phil 
     73        1.1      phil EXTERN id_rec *root INIT(NULL);
     74        1.1      phil 
     75        1.1      phil EXTERN struct menu_info default_info;
     76        1.1      phil EXTERN id_rec default_menu;
     77        1.2      phil 
     78        1.2      phil EXTERN action error_act INIT({NULL});
     79        1.1      phil 
     80        1.1      phil /* Prototypes. */
     81        1.1      phil 
     82        1.1      phil /* From util.c */
     83        1.7    itojun void yyerror(const char *, ...)
     84        1.4        is      __attribute__((__format__(__printf__, 1, 2)));
     85        1.7    itojun void buff_add_ch(char);
     86        1.7    itojun char *buff_copy(void);
     87        1.1      phil 
     88        1.1      phil /* from scan.l */
     89        1.7    itojun int yylex(void);
     90        1.1      phil 
     91        1.1      phil /* from parse.y */
     92        1.7    itojun int yyparse(void);
     93        1.1      phil 
     94        1.1      phil /* Vars not defined in main.c */
     95        1.1      phil extern FILE *yyin;
     96        1.1      phil 
     97        1.1      phil /* from avl.c */
     98        1.7    itojun id_rec *find_id(id_rec *, char *);
     99        1.7    itojun int insert_id(id_rec **, id_rec *);
    100        1.1      phil 
    101        1.1      phil /* from mdb.c */
    102        1.7    itojun id_rec *get_menu(char *);
    103        1.7    itojun void check_defined(void);
    104        1.7    itojun void write_menu_file(char *);
    105        1.1      phil 
    106