/*
 *   COMPONENT_NAME: somc
 *
 *   ORIGINS: 27
 *
 *
 *   10H9767, 10H9769  (C) COPYRIGHT International Business Machines Corp. 1992,1994
 *   All Rights Reserved
 *   Licensed Materials - Property of IBM
 *   US Government Users Restricted Rights - Use, duplication or
 *   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
 */
/* @(#) somc/emitlib.pub 2.7 6/7/96 14:29:25 [12/22/96 21:11:33] */


/*
 *         File:    emitlib.h.
 *     Contents:    General routines used by Emitter Framework.
 */

#ifndef emitlib_h
#define emitlib_h

#ifndef SOMEXTERN
    #ifdef __cplusplus
	#define SOMEXTERN extern "C"
    #else
	#define SOMEXTERN extern
    #endif /* __cplusplus */
#endif /* SOMEXTERN */

#include <stdio.h>
#include <stdlib.h>
    /* #ifdef __OS2__ */
        /* #include <io.h> */
    /* #else */
        /* #include <unistd.h> */
    /* #endif */
#include <sm.h>

#ifndef SOM_SOMC_NO_BACKCOMPAT
/* These are here for backward compatibilty */
SOMEXTERN SOMDLLIMPORT FILE *somtopenEmitFile(char *file, char *ext);
SOMEXTERN SOMDLLIMPORT int somtfclose(FILE *fp);
SOMEXTERN SOMDLLIMPORT void somterror(char *file, long lineno, char *fmt, ...);
SOMEXTERN SOMDLLIMPORT void somtfatal(char *file, long lineno, char *fmt, ...);
SOMEXTERN SOMDLLIMPORT void somtinternal(char *file, long lineno, char *fmt, ...);
SOMEXTERN SOMDLLIMPORT void somtmsg(char *file, long lineno, char *fmt, ...);
SOMEXTERN SOMDLLIMPORT void somtresetEmitSignals();
SOMEXTERN SOMDLLIMPORT void somtunsetEmitSignals(void);
SOMEXTERN SOMDLLIMPORT void somtwarn(char *file, long lineno, char *fmt, ...);
#endif

/* New versions ending in SL for SOMLINK */
SOMEXTERN SOMDLLIMPORT FILE *SOMLINK somtopenEmitFileSL(char *file, char *ext);
SOMEXTERN SOMDLLIMPORT int SOMLINK somtfcloseSL(FILE *fp);
SOMEXTERN SOMDLLIMPORT void SOMLINK somterrorSL(char *file, long lineno, char *fmt, ...);
SOMEXTERN SOMDLLIMPORT void SOMLINK somtfatalSL(char *file, long lineno, char *fmt, ...);
SOMEXTERN SOMDLLIMPORT void SOMLINK somtinternalSL(char *file, long lineno, char *fmt, ...);
SOMEXTERN SOMDLLIMPORT void SOMLINK somtmsgSL(char *file, long lineno, char *fmt, ...);
SOMEXTERN SOMDLLIMPORT void SOMLINK somtresetEmitSignalsSL();
SOMEXTERN SOMDLLIMPORT void SOMLINK somtunsetEmitSignalsSL(void);
SOMEXTERN SOMDLLIMPORT void SOMLINK somtwarnSL(char *file, long lineno, char *fmt, ...);

#endif
