/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 1999 by Sun Microsystems, Inc.
* All rights reserved.
*/
#ifndef _ITMCOMP_H
#define _ITMCOMP_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#include <stdlib.h>
#include "iconv_tm.h"
#define ITMC_STATUS_SUCCESS (0)
/*
* exit status:
* ITMC_STATUS_SUCCESS
* ITMC_STATUS_CMD specified options are wrong
* ITMC_STATUS_CMD2 cannot access specified file
* ITMC_STATUS_BT Binary Table format error
* ITMC_STATUS_BT2 Binary Table against limitation
* ITMC_STATUS_SYS resource shortage (e.g.: malloc )
* ITMC_STATUS_SYS2 internal error: never happen
*/
/*
* used later
*/
struct _itmc_ref;
/*
* command line option
*/
typedef enum {
ITMC_MAP_UNKNOWN = 0,
typedef struct _itmc_map_name_type {
char *name;
int hash_factor;
typedef struct {
char *my_name;
char **input_file;
int input_file_num;
char *output_file;
char *interpreter;
char **cpp_opt;
int cpp_opt_num;
int cpp_opt_reserved;
char *preprocess_default;
char *preprocess_specified;
char *preprocess;
char *disassemble;
int binary_search;
int large_table;
int force_overwrite;
int strip;
int quiet;
int no_output;
char *trace;
} cmd_opt_t;
/*
* data list
*/
typedef struct {
void *obj;
} obj_array_t;
typedef struct _itmc_obj {
void *obj;
} itmc_obj_t;
/*
* data pair: used for map and range
*/
typedef struct {
/*
* map pair list
*/
typedef struct _itmc_map {
} itmc_map_t;
/*
* cross reference: used for relocation
*/
typedef struct _itmc_ref_link {
typedef struct _itmc_name {
} itmc_name_t;
typedef struct _itmc_ref {
void *referencee;
int vertex_index;
} itmc_ref_t;
/*
* action
*/
typedef struct {
/*
* map attribute
*/
typedef struct {
int hash_factor;
/*
* operation hierarchy
*/
typedef struct itm_opt_outer {
typedef struct itm_opt_inner {
/*
* itm compiler object type
*/
#define ITMC_OBJ_NONE (0)
/*
* global variable
*/
extern itmc_name_t *name_first;
extern itmc_name_t *name_last;
extern itmc_name_t name_lookup_error;
extern int error_deferred;
extern char *itm_input_file;
extern char *itm_output_file;
extern struct itm_opt_outer *itm_op_outer;
/*
* macro definition
*/
#if !defined(ROUNDUP)
#endif
/*
* trace
*/
#if defined(ENABLE_TRACE)
#else
#define TRACE(c)
#endif
/*
* error
*/
/*
* function prototype
*/
extern void disassemble(char *);
extern void *malloc_vital(size_t);
extern char *name_to_str(itm_data_t *);
extern char *data_to_hexadecimal(itm_data_t *);
extern itm_data_t *str_to_data(int, char *);
#if defined(ENABLE_TRACE)
extern void trace_message(char *, ...);
#endif
extern char *itm_name_type_name[];
#ifdef __cplusplus
}
#endif
#endif /* !_ITMCOMP_H */