162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * Assembler for the sequencer program downloaded to Aic7xxx SCSI host adapters 362306a36Sopenharmony_ci * 462306a36Sopenharmony_ci * Copyright (c) 1997 Justin T. Gibbs. 562306a36Sopenharmony_ci * Copyright (c) 2001, 2002 Adaptec Inc. 662306a36Sopenharmony_ci * All rights reserved. 762306a36Sopenharmony_ci * 862306a36Sopenharmony_ci * Redistribution and use in source and binary forms, with or without 962306a36Sopenharmony_ci * modification, are permitted provided that the following conditions 1062306a36Sopenharmony_ci * are met: 1162306a36Sopenharmony_ci * 1. Redistributions of source code must retain the above copyright 1262306a36Sopenharmony_ci * notice, this list of conditions, and the following disclaimer, 1362306a36Sopenharmony_ci * without modification. 1462306a36Sopenharmony_ci * 2. Redistributions in binary form must reproduce at minimum a disclaimer 1562306a36Sopenharmony_ci * substantially similar to the "NO WARRANTY" disclaimer below 1662306a36Sopenharmony_ci * ("Disclaimer") and any redistribution must be conditioned upon 1762306a36Sopenharmony_ci * including a substantially similar Disclaimer requirement for further 1862306a36Sopenharmony_ci * binary redistribution. 1962306a36Sopenharmony_ci * 3. Neither the names of the above-listed copyright holders nor the names 2062306a36Sopenharmony_ci * of any contributors may be used to endorse or promote products derived 2162306a36Sopenharmony_ci * from this software without specific prior written permission. 2262306a36Sopenharmony_ci * 2362306a36Sopenharmony_ci * Alternatively, this software may be distributed under the terms of the 2462306a36Sopenharmony_ci * GNU General Public License ("GPL") version 2 as published by the Free 2562306a36Sopenharmony_ci * Software Foundation. 2662306a36Sopenharmony_ci * 2762306a36Sopenharmony_ci * NO WARRANTY 2862306a36Sopenharmony_ci * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 2962306a36Sopenharmony_ci * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 3062306a36Sopenharmony_ci * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR 3162306a36Sopenharmony_ci * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 3262306a36Sopenharmony_ci * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 3362306a36Sopenharmony_ci * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 3462306a36Sopenharmony_ci * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 3562306a36Sopenharmony_ci * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 3662306a36Sopenharmony_ci * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 3762306a36Sopenharmony_ci * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 3862306a36Sopenharmony_ci * POSSIBILITY OF SUCH DAMAGES. 3962306a36Sopenharmony_ci * 4062306a36Sopenharmony_ci * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm.h#14 $ 4162306a36Sopenharmony_ci * 4262306a36Sopenharmony_ci * $FreeBSD$ 4362306a36Sopenharmony_ci */ 4462306a36Sopenharmony_ci 4562306a36Sopenharmony_ci#include "../queue.h" 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_ci#ifndef TRUE 4862306a36Sopenharmony_ci#define TRUE 1 4962306a36Sopenharmony_ci#endif 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ci#ifndef FALSE 5262306a36Sopenharmony_ci#define FALSE 0 5362306a36Sopenharmony_ci#endif 5462306a36Sopenharmony_ci 5562306a36Sopenharmony_citypedef struct path_entry { 5662306a36Sopenharmony_ci char *directory; 5762306a36Sopenharmony_ci int quoted_includes_only; 5862306a36Sopenharmony_ci SLIST_ENTRY(path_entry) links; 5962306a36Sopenharmony_ci} *path_entry_t; 6062306a36Sopenharmony_ci 6162306a36Sopenharmony_citypedef enum { 6262306a36Sopenharmony_ci QUOTED_INCLUDE, 6362306a36Sopenharmony_ci BRACKETED_INCLUDE, 6462306a36Sopenharmony_ci SOURCE_FILE 6562306a36Sopenharmony_ci} include_type; 6662306a36Sopenharmony_ci 6762306a36Sopenharmony_ciSLIST_HEAD(path_list, path_entry); 6862306a36Sopenharmony_ci 6962306a36Sopenharmony_ciextern struct path_list search_path; 7062306a36Sopenharmony_ciextern struct cs_tailq cs_tailq; 7162306a36Sopenharmony_ciextern struct scope_list scope_stack; 7262306a36Sopenharmony_ciextern struct symlist patch_functions; 7362306a36Sopenharmony_ciextern int includes_search_curdir; /* False if we've seen -I- */ 7462306a36Sopenharmony_ciextern char *appname; 7562306a36Sopenharmony_ciextern char *stock_include_file; 7662306a36Sopenharmony_ciextern int yylineno; 7762306a36Sopenharmony_ciextern char *yyfilename; 7862306a36Sopenharmony_ciextern char *prefix; 7962306a36Sopenharmony_ciextern char *patch_arg_list; 8062306a36Sopenharmony_ciextern char *versions; 8162306a36Sopenharmony_ciextern int src_mode; 8262306a36Sopenharmony_ciextern int dst_mode; 8362306a36Sopenharmony_cistruct symbol; 8462306a36Sopenharmony_ci 8562306a36Sopenharmony_civoid stop(const char *errstring, int err_code); 8662306a36Sopenharmony_civoid include_file(char *file_name, include_type type); 8762306a36Sopenharmony_civoid expand_macro(struct symbol *macro_symbol); 8862306a36Sopenharmony_cistruct instruction *seq_alloc(void); 8962306a36Sopenharmony_cistruct critical_section *cs_alloc(void); 9062306a36Sopenharmony_cistruct scope *scope_alloc(void); 9162306a36Sopenharmony_civoid process_scope(struct scope *); 92