aicasm.h revision 66270
1/*
2 * Assembler for the sequencer program downloaded to Aic7xxx SCSI host adapters
3 *
4 * Copyright (c) 1997 Justin T. Gibbs.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 *    notice, this list of conditions, and the following disclaimer,
12 *    without modification.
13 * 2. The name of the author may not be used to endorse or promote products
14 *    derived from this software without specific prior written permission.
15 *
16 * Alternatively, this software may be distributed under the terms of the
17 * GNU Public License ("GPL").
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
23 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 *
31 * $Id: //depot/src/aic7xxx/aicasm/aicasm.h#3 $
32 *
33 * $FreeBSD: head/sys/dev/aic7xxx/aicasm/aicasm.h 66270 2000-09-22 22:19:55Z gibbs $
34 */
35
36#ifdef __linux__
37#include "../queue.h"
38#else
39#include <sys/queue.h>
40#endif
41
42#ifndef TRUE
43#define TRUE 1
44#endif
45
46#ifndef FALSE
47#define FALSE 0
48#endif
49
50typedef struct path_entry {
51	char	*directory;
52	int	quoted_includes_only;
53	SLIST_ENTRY(path_entry) links;
54} *path_entry_t;
55
56typedef enum {
57	QUOTED_INCLUDE,
58	BRACKETED_INCLUDE,
59	SOURCE_FILE
60} include_type;
61
62SLIST_HEAD(path_list, path_entry);
63
64extern struct path_list search_path;
65extern struct cs_tailq cs_tailq;
66extern struct scope_list scope_stack;
67extern struct symlist patch_functions;
68extern int includes_search_curdir;		/* False if we've seen -I- */
69extern char *appname;
70extern int yylineno;
71extern char *yyfilename;
72
73void stop(const char *errstring, int err_code);
74void include_file(char *file_name, include_type type);
75struct instruction *seq_alloc(void);
76struct critical_section *cs_alloc(void);
77struct scope *scope_alloc(void);
78void process_scope(struct scope *);
79