191586Smarkm/* $NetBSD: externs2.h,v 1.7 2001/05/28 12:40:38 lukem Exp $ */
212099Sjoerg
312099Sjoerg/*
491586Smarkm * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
512099Sjoerg * Copyright (c) 1994, 1995 Jochen Pohl
612099Sjoerg * All Rights Reserved.
712099Sjoerg *
812099Sjoerg * Redistribution and use in source and binary forms, with or without
912099Sjoerg * modification, are permitted provided that the following conditions
1012099Sjoerg * are met:
1112099Sjoerg * 1. Redistributions of source code must retain the above copyright
1212099Sjoerg *    notice, this list of conditions and the following disclaimer.
1312099Sjoerg * 2. Redistributions in binary form must reproduce the above copyright
1412099Sjoerg *    notice, this list of conditions and the following disclaimer in the
1512099Sjoerg *    documentation and/or other materials provided with the distribution.
1612099Sjoerg * 3. All advertising materials mentioning features or use of this software
1712099Sjoerg *    must display the following acknowledgement:
1812099Sjoerg *      This product includes software developed by Jochen Pohl for
1912099Sjoerg *	The NetBSD Project.
2012099Sjoerg * 4. The name of the author may not be used to endorse or promote products
2112099Sjoerg *    derived from this software without specific prior written permission.
2212099Sjoerg *
2312099Sjoerg * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
2412099Sjoerg * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
2512099Sjoerg * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
2612099Sjoerg * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
2712099Sjoerg * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
2812099Sjoerg * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2912099Sjoerg * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
3012099Sjoerg * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3112099Sjoerg * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
3212099Sjoerg * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3312099Sjoerg */
3412099Sjoerg
3512099Sjoerg/*
3612099Sjoerg * main.c
3712099Sjoerg */
3812099Sjoergextern	int	xflag;
3912099Sjoergextern	int	uflag;
4012099Sjoergextern	int	Cflag;
4112099Sjoergextern	const	char *libname;
4212099Sjoergextern	int	sflag;
4312099Sjoergextern	int	tflag;
4412099Sjoergextern	int	Hflag;
4512099Sjoergextern	int	hflag;
4612099Sjoergextern	int	Fflag;
4712099Sjoerg
4812099Sjoerg
4912099Sjoerg/*
5012099Sjoerg * hash.c
5112099Sjoerg */
5291586Smarkmextern	void	_inithash(hte_t ***);
5391586Smarkmextern	hte_t	*_hsearch(hte_t **, const char *, int);
5491586Smarkmextern	void	_forall(hte_t **, void (*)(hte_t *));
5591586Smarkmextern	void	_destroyhash(hte_t **);
5612099Sjoerg
5791586Smarkm#define	inithash()	_inithash(NULL);
5891586Smarkm#define	hsearch(a, b)	_hsearch(NULL, (a), (b))
5991586Smarkm#define	forall(a)	_forall(NULL, (a))
6091586Smarkm
6112099Sjoerg/*
6212099Sjoerg * read.c
6312099Sjoerg */
6412099Sjoergextern	const	char **fnames;
6512099Sjoergextern	type_t	**tlst;
6612099Sjoerg
6791586Smarkmextern	void	readfile(const char *);
6891586Smarkmextern	void	mkstatic(hte_t *);
6912099Sjoerg
7012099Sjoerg/*
7112099Sjoerg * mem2.c
7212099Sjoerg */
7391586Smarkmextern	void	initmem(void);
7491586Smarkmextern	void	*xalloc(size_t);
7512099Sjoerg
7612099Sjoerg/*
7712099Sjoerg * chk.c
7812099Sjoerg */
7991586Smarkmextern	void	inittyp(void);
8091586Smarkmextern	void	mainused(void);
8191586Smarkmextern	void	chkname(hte_t *);
8212099Sjoerg
8312099Sjoerg/*
8412099Sjoerg * msg.c
8512099Sjoerg */
8691586Smarkmextern	void	msg(int, ...);
8791586Smarkmextern	const	char *mkpos(pos_t *);
8812099Sjoerg
8912099Sjoerg/*
9012099Sjoerg * emit2.c
9112099Sjoerg */
9291586Smarkmextern	void	outlib(const char *);
9391586Smarkmextern	int	addoutfile(short);
94