/* %Z%%M% %I% %E% */

/*
 * Copyright (c) 1990, 1991, 1992, 1995 by Wayne C. Gramlich.
 * All rights reserved.
 *
 * Permission to use, copy, modify, distribute, and sell this software
 * for any purpose is hereby granted without fee provided that the above
 * copyright notice and this permission are retained.  The author makes
 * no representations about the suitability of this software for any purpose.
 * It is provided "as is" without express or implied warranty.
 */

/* This file declares routines for manipulating routine types: */

#ifndef ROUTINE_EXPORTS_H
#define ROUTINE_EXPORTS_H

#ifndef CALL_TYPES_H
#include "call_types.h"
#endif

#ifndef GEN_TYPES_H
#include "gen_types.h"
#endif

#ifndef HEAP_TYPES_H
#include "heap_types.h"
#endif

#ifndef MODULE_TYPES_H
#include "module_types.h"
#endif

#ifndef MSG_TYPES_H
#include "msg_types.h"
#endif

#ifndef PARSER_TYPES_H
#include "parser_types.h"
#endif

#ifndef ROUTINE_TYPES_H
#include "routine_types.h"
#endif

#ifndef STATEMENT_TYPES_H
#include "statement_types.h"
#endif

#ifndef STR_TYPES_H
#include "str_types.h"
#endif

#ifndef TABLE_TYPES_H
#include "table_types.h"
#endif

#ifndef TYPE_TYPES_H
#include "type_types.h"
#endif

#ifndef UNIX_STDIO_H
#include "unix_stdio.h"
#endif

#ifndef VECTOR_TYPES_H
#include "vector_types.h"
#endif

extern void		routine_entry_delete(Routine_entry);
extern int		routine_entry_equal(Routine_entry, Routine_entry);
extern int		routine_entry_hash(Routine_entry);
extern Routine_entry	routine_entry_insert(Routine_table, Str, Type_ref,
					     Type_proto, int, int);
extern Routine_entry	routine_entry_replace(Routine_table, Str, Type_ref,
					      Type_proto);
extern Routine_entry	routine_entry_lookup(Routine_table, Str, Str, int);
extern void		routine_entry_used(Routine_entry, Routine_table);
extern void		routine_entrys_dump(Routine_table, Stdio);
extern void		routine_entrys_export(Routine_table, Stdio);
extern void		routine_entrys_import(Routine_table, Stdio, int);

extern int		routine_ref_equal(Routine_ref, Routine_ref);
extern int		routine_ref_hash(Routine_ref);
extern Routine_ref	routine_ref_insert(Routine_table, Str, Type_ref, int);
extern Routine_ref	routine_ref_lookup(Routine_table, Str, Type_ref, int);
extern void		routine_refs_dump(Routine_table, Stdio);

extern Breakpoint	routine_breakpoint_create(Routine, int, Msg, Heap);
extern void		routine_convert(Routine, Convert);
extern void		routines_gen(Vec(Routine), Gen);
extern Routine		routine_parse(Parser, int, Module);
extern void		routine_print(Routine, Gen);

extern Routine_table	routine_table_create(Msg, Type_tables, Heap);
extern void		routine_table_dump(Routine_table, Stdio);
extern Type_refs	routine_table_parameters_get(Routine_table, int);
extern void		routine_table_proto_gen(Routine_table, Gen);
extern void		routine_table_signature_gen(Routine_table, Gen);
extern int		routine_table_used_size(Routine_table);

#endif /* ROUTINE_EXPORTS_H */
