/*****************************************************************/
/**                                                             **/
/**             (C) Copyright 1992 the Regents of the           **/
/**        University of California.  All Rights Reserved.      **/
/**                                                             **/
/**        This work was produced under the sponsorship of      **/
/**         the U.S. Department of Energy.  The Government      **/
/**                retains certain rights therein.              **/
/**                                                             **/
/**                         Written by                          **/
/**         Distributed Programming Environments Project        **/
/**           Computer Software and Networking Division,        **/
/**                   Livermore Computer Center,                **/
/**            Lawrence Livermore National Laboratory           **/
/**                                                             **/
/*****************************************************************/

#ifndef GEN_CODE_H
#define GEN_CODE_H

static char sccsid_gen_code_h[] = "@(#)gen_code.h	1.11 11/13/92 11:07:54 LLNL ";


void gen_exception_goto(FILE *,int,char *,char *);
void gen_exception(FILE *,
		   int indent,
		   char *err,
		   char *e_label,
		   char *instname);
char *gen_exception_label();
void gen_exception_header(FILE *, char *exception_label, char *ok_label);

void gen_exception_com_error(FILE *,char *,char *);
void gen_exception_internal_error(FILE *,char *,char *);
void gen_exception_protocol_error(FILE *,char *,char *);
void gen_exception_missing_op(FILE *,char *);
void gen_exception_bad_op_id(FILE *,char *);
void gen_exception_missing_arg(FILE *,char *,char *);
void gen_exception_name_error(FILE *,char *,char *);
void gen_default_handlers(FILE *,Handler_Masks, char *ok_label);
void gen_context_names(char *acn, char *pcn);
void gen_log_statement(FILE *out,int z,char *title,char *inst,char *e_label);
void gen_log_type(FILE *out, 
                  int z,
		  char *inst, 
		  char *label, 
		  char *vexpr, 
		  char *print_routine, 
		  int ptr_already, 
		  char *e_label);
void gen_getheader(FILE *,
		   int,
		   char *,
		   char *,
		   __RO_int32 = ~0, 
		   char * = "__ROx_ASN_EXPECTKNOWNTYPE");
void gen_log_operation(FILE *out,int z,char *title, char *inst,
			char *iid, char *lid, char *e_label);
void gen_accept_start(FILE *out,
		      instance_element *ie,
		      char *s1,
		      char *s2,
		      boolean dont_P_semaphore);
void gen_accept_end(FILE *out,boolean *seen,char *e_label);
void gen_accept_end(FILE *out,int seen,char *e_label);

#define BYTE_CEILING(X) (((X)/8)+((X)%8>0))
#endif
