1 /* ***********************************************************
 2    *                                                         *
 3    * Copyright, (C) Honeywell Bull Inc., 1987                *
 4    *                                                         *
 5    * Copyright, (C) Honeywell Information Systems Inc., 1986 *
 6    *                                                         *
 7    *********************************************************** */
 8 
 9 /* HISTORY COMMENTS:
10   1) change(86-07-12,Westcott), approve(87-07-13,MCR7580),
11      audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072):
12      Created.
13                                                    END HISTORY COMMENTS */
14 
15 /* : PROCEDURE FUNCTION (putstat)
16 
17 Sends a message to the foreground application that contains a null terminated
18 character string that contains status information.
19 */
20 
21 #include <dos.h>
22 #include <stdio.h>
23 #include <ws.h>
24 #include <ws_dcls.h>
25 #include <ws_func.h>
26 #include <ws_error.h>
27 #include <wsmincap.h>
28 
29 putstat (p_status_reply,p_mcb_ptr)
30 
31 char *p_status_reply;                    /* Reply message */
32 mcb  *p_mcb_ptr;                         /* Caller's MCB */
33 {
34 int code;               /* return code */
35 int i;                  /* loop counter*/
36 int system;
37 int major;
38 int param_size;
39 struct putbg_struc msg; /* structure for message */
40 
41    if (p_mcb_ptr == NULL)
42       return (WSINVMCB);
43 
44 /* : copy status argument to mowse buffer */
45 
46    msg.length = stccpy (msg.bgmsg, p_status_reply, WSPAKSIZ);
47 
48 /* : create caller's major capability number */
49 
50    system = (int)(p_mcb_ptr -> system_id);
51    major = (int)(p_mcb_ptr -> major_capability);
52    if (code = c_pack (system, major, &msg.sender_major))
53       return (code);
54 
55 /* : call user_interrupt to send the status */
56 
57    msg.type = STATUS_REPLY;
58    param_size = msg.length + sizeof (struct putbg_struc) - WSPAKSIZ;
59    return (call_mowse_int (I$PUTBGMES, &msg , param_size));
60 }
61 ^Z