/*static char *SCCSID = "@(#)cmdspmsg.c	6.2 90/12/10";                                 */
/****************************************************************************/
/*                                                                          */
/*                       IBM/Microsoft Confidential                         */
/*                                                                          */
/*                 Copyright (c) IBM Corporation  1987, 1990                */
/*                 Copyright (c) Microsoft Corp.  1987, 1990                */
/*                           All Rights Reserved                            */
/*                                                                          */
/****************************************************************************/

/******************** START OF SPECIFICATION *************************/
/*                                                                   */
/* SUBROUTINE NAME:  com_dispmsg                                     */
/*                                                                   */
/* DESCRIPTIVE NAME:  DISPLAY MESSAGE.                               */
/*                                                                   */
/* FUNCTION:  Write message in standard output device.               */
/*            All messages used here are defined in the CP/DOS       */
/*            message file.                                          */
/*                                                                   */
/* NOTES:                                                            */
/*                                                                   */
/* ENTRY POINT:  com_dispmsg                                         */
/*   LINKAGE  :                                                      */
/*                                                                   */
/* INPUT:   int  message_id - id of which message is to be displayed */
/*          int  devicetype - specify output device type             */
/*                            0 : normal message and                 */
/*                                error message all go to stdout     */
/*                            1 : error message all go to stderr     */
/*          int  insertreq  - variable insert request                */
/*                            0: no insertion                        */
/*                            1: insert variable                     */
/*          char *insertstr - pointer to string which to be inserted */
/*                            into the message. If insertreq is 0,   */
/*                            this pointer is not effective.         */
/*                                                                   */
/*  for example:                                                     */
/*  com_dispmsg(MSG_CMM_EXEC_FAIL,STD_ERROR, INSERT, fs_save);       */
/*                                                                   */
/* EXIT-NORMAL:                                                      */
/*   RETURN CODE SYMBOL:  none                                       */
/*                                                                   */
/* EXIT-ERROR:                                                       */
/*   RETURN CODE SYMBOL:  none                                       */
/*                                                                   */
/* EFFECTS:                                                          */
/*                                                                   */
/* INTERNAL REFERENCES:   none                                       */
/*   ROUTINES:                                                       */
/*                                                                   */
/* EXTERNAL REFERENCES:                                              */
/*   ROUTINES:                                                       */
/*                                                                   */
/*       computmsg  - display message                                */
/*                                                                   */
/*                                                                   */
/******************* END OF SPECIFICATIONS ***************************/
#include <comsub.h>                    /* common subroutine    */
#include <utilmids.h>                  /* C run time func      */

com_dispmsg(msg_id, devicetype, insertreq, insertstr)
unsigned msg_id;                        /* id of message to be printed */
unsigned devicetype;                    /* output device type          */
unsigned insertreq;                     /* variable insert request     */
char *insertstr;                              /* pointer to insert varialbe  */
{
  char *ivtable[1];                           /* array pointer to table      */
  unsigned resptype = 0;                /* response type = display msg */
  char     respdata;                         /* response data - unused      */
  unsigned respsize = 1;                /* size of response data area  */
                                              /* string to be inserted       */
  ivtable[0] = insertstr;                     /*                             */
  computmsg(( char ** ) ivtable,              /*                             */
            insertreq,                        /* display a message without   */
            msg_id,                           /* any response                */
            "OSO001.MSG",                     /*                             */
            devicetype,                       /*                             */
            resptype,                         /* response type               */
            &respdata,                        /* response data area          */
            respsize );                       /* size of response data area  */

return(0);
}


