/*static char *SCCSID = "@(#)gcode.c	6.2 91/01/14";*/
#define SCCSID "@(#)gcode.c	6.2 91/01/14"
/*
 *	IBM/Microsoft Confidential
 *
 *	Copyright (c) IBM Corporation 1987, 1989
 *	Copyright (c) Microsoft Corporation 1987, 1989
 *
 *	All Rights Reserved
 *
 */

/***	GCODE.C - Functions shared by Pinball utilities
 *
 *	CDROM version 1.0
 * Paul Bingman, NWSP
 * Copyright 1988, 1989 Microsoft Corporation
 *
 * This CDROM version was adapted from the Pinball version by
 *	Gregory A. Jones
 *
 *	Revision History:
 *	Paul Bingman  8/ 7/89  Original CDROM
 */

#define INCL_DOSDEVICES
#define INCL_DOSINFOSEG
#define INCL_DOSSIGNALS
#define INCL_DOSERRORS
#define INCL_NOPMAPI

#include <os2.h>
#include "gdata.h"
#include "defs.h"



/***	error_msg - display error message
 *
 *	This function is called to display a message to the standard
 *	error device.  It calls computmsg() to display the message.
 *	To display messages with substitution strings, computmsg()
 *	must be called manually.
 *
 *	This function only works with message IDs for CDROM messages;
 *	it will not work for standard OS/2 messages that live in OSO001.MSG.
 *
 *	error_msg (msg)
 *
 *	ENTRY		msg - message ID
 *
 *	EXIT		No return value
 *
 *	CALLS		computmsg
 */

void
NEAR error_msg (msg)
USHORT msg;
{
	computmsg (NULL,
		0,
		msg,
		msgfilename,
		STDERR_CODE,
		NO_RESPONSE,
		NULL,
		0);
}


/***	out_msg - output a message
 *
 *	This function is called to display a message to the standard
 *	output device.	It calls computmsg() to display the message.
 *	A substitution string for the message can be passed.  To display
 *	a message which requires more than one substitution string,
 *	computmsg() must be called manually.
 *
 *	This function only works with message IDs for Pinball messages;
 *	it will not work for standard OS/2 messages that live in OSO001.MSG.
 *
 *	out_msg (msg, subst)
 *
 *	ENTRY		msg   - message ID
 *			subst - pointer to substitution string, or NULL if none
 *
 *	EXIT		No return value
 *
 *	CALLS		computmsg
 */

void
NEAR out_msg (msg, subst)
USHORT  msg;
UCHAR   *subst;
{
	computmsg (((subst) ? &subst : NULL),
		((subst) ? 1 : 0),
		msg,
		msgfilename,
		STDOUT_CODE,
		NO_RESPONSE,
		NULL,
		0);
}

/* end of gcode.c (CDROM */

