
/* 
 * $Copyright:	$
 * Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989, 1990 
 * Sequent Computer Systems, Inc.   All rights reserved.
 *  
 * This software is furnished under a license and may be used
 * only in accordance with the terms of that license and with the
 * inclusion of the above copyright notice.   This software may not
 * be provided or otherwise made available to, or used by, any
 * other person.  No title to or ownership of the software is
 * hereby transferred.
 */

/*	Copyright (c) 1984 AT&T	*/
/*	  All Rights Reserved  	*/

/*	THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T	*/
/*	The copyright notice above does not evidence any   	*/
/*	actual or intended publication of such source code.	*/
#ident "$Header: xsld.h 1.1 90/01/19 $@(#)xsld.h	1.1 89/12/01"
#define OUTFILE		"a.out.X"
#define OUTC		"xmsg.c"
#define MSG_FILE_SUFFIX	"m"
#define MSG_LIB_SUFFIX	"M"
#define CONFIG_FILE	"/lib/xsconf"
#define CRT_MESSAGES	"/lib/xscrt.m"
#define STRINGS_REPLACE "strings_replace"
#define STRINGS_INIT	"strings_init"
#define AUTO_LIB	"xsc"

#ifndef FALSE
typedef int bool;
#define FALSE	0
#define TRUE	1
#endif

typedef int LIB;
typedef int MODULE;
typedef int SYMBOL;

typedef struct {
  SYMBOL symtab_sym;
  int symtab_entry;
  MODULE symtab_mo;
  bool symtab_init;
  bool symtab_def;
} SYMTAB;

typedef struct {
  MODULE succ_mo;
  SYMBOL succ_sym;
} SUCCLIST;
  
typedef struct {
  LIB mo_lib;
  char *mo_name;
  bool mo_used;
  long mo_msg_start;
  long mo_msg_end;
  char *mo_func;
  int mo_set;
  bool mo_tag;
  int mo_pred_count;
  int mo_succ_free;
  int mo_succ_max;
  int mo_succ_cur;
  SUCCLIST *mo_succ;
  bool mo_succ_used;
  SYMBOL mo_succ_sym;
  SYMTAB mo_def;
  SYMTAB mo_undef;
  SYMTAB mo_def_last;
  SYMTAB mo_undef_last;
  bool mo_badundef;
  bool mo_badinit;
} NAME;

typedef struct {
  char *sy_name;
  bool sy_used;
  bool sy_def;
  bool sy_init;
  int sy_count;
  MODULE sy_mo;
  SYMTAB sy_undef_back;
  SYMTAB sy_undef_forw;
  SYMTAB *sy_sy;
  int sy_free;
  int sy_max;
} SYM;

#define NULL_SYMTAB	{ NULL_SYMBOL, -1, NULL_MODULE, FALSE, FALSE }
#define NULL_SYMBOL	-1
#define NULL_MODULE	-1
#define NULL_LIB	-1
#define NULL_SUCC	{ NULL_MODULE, NULL_SYMBOL }

extern MODULE	null_mo;
extern SYMBOL	null_symbol;
extern SYMTAB	null_symtab;
extern LIB	null_lib;
extern SUCCLIST null_succ;

extern char *outmsg;
extern char *outC;
extern char *lang;
extern char *desc_file;
extern int undefined;
extern bool multi_def;
extern bool bad_init;
extern bool bad_undef;
extern char buf[BUFSIZ];
extern int names_free;
extern char *str_replace, *str_init;

MODULE add_module();
char *mo_name();
void mo_used_new();
bool mo_used();
void mo_msg_start_new();
long mo_msg_start();
void mo_msg_end_new();
long mo_msg_end();
void mo_func_new();
char *mo_func();
SYMTAB mo_def();
void mo_def_new();
SYMTAB mo_undef();
void mo_undef_new();
SYMTAB mo_def_last();
void mo_def_last_new();
SYMTAB mo_undef_last();
void mo_undef_last_new();
void mo_mark_start();
void mo_mark_stop();
MODULE mo_mark_begin();
MODULE mo_mark_next();
bool is_null_mo();
void mo_print();
MODULE mo_scan_first();
MODULE mo_scan_next();
int mo_set();
void mo_set_new();
void mo_add_init();
SUCCLIST mo_succ_first();
SUCCLIST mo_succ_next();
SYMBOL succ_sym();
SYMBOL succ_mo();
bool is_null_succ();
void mo_pred_count_new();
int mo_pred_count();
void mo_tag_new();
bool mo_tag();
void mo_modules_set();
void mo_modules_new();
int mo_modules();
void mo_succ_sym_new();
SYMBOL mo_succ_sym();
bool mo_badundef();
void mo_badundef_new();
bool mo_badinit();
void mo_badinit_new();

LIB add_library();
bool is_user_lib();
char *system_lib();
void lib_print();
char *lib_name();

void load_user_module();
void load_library();
void load_module();

void load_def();
void load_undef();
void use_module();

void add_entry();
SYMTAB symtab_next();
SYMBOL symtab_sym();
bool symtab_init();
SYMBOL sym_locate();
SYMBOL sym_insert();
char *sym_name();
bool sym_used();
void sym_used_new();
bool sym_def();
void sym_def_new();
bool sym_init();
void sym_init_new();
int sym_count();
void sym_count_new();
void add_undef();
void del_undef();
int undef_count();
bool is_null_symtab();
bool is_null_symbol();
MODULE symtab_mo();
bool symtab_def();
void disp_multidef();
void disp_undefined();
void sym_add_init();
void sym_mo_new();
MODULE sym_mo();
MODULE mo_defines();

void add_to_be_used();
void load_to_be_used();

void gen_out_files();

char *sym_store();
char *na_store();
