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-08-27,Flegel), approve(87-07-13,MCR7580), 11 audit(87-07-13,Leskiw), install(87-08-07,MR12.1-1072): 12 Created from extraction of rcvdata.c 13 END HISTORY COMMENTS */ 14 15 /* : PROCEDURE FUNCTION (rcvmsg): 16 17 Place the specified message into the specified linked list. 18 */ 19 20 #include "dos.h" 21 #include "stdio.h" 22 #include "ws.h" 23 #include "alloc.h" 24 #include "cat.h" 25 #include "ws_fgb.h" 26 #include "ws_buf.h" 27 #include "ws_msg.h" 28 #include "wsmincap.h" 29 #include "ws_error.h" 30 31 /*^L*/ 32 33 rcvmsg (p_msg_ptr, p_first_ptr, p_last_ptr) 34 struct fgbstr *p_msg_ptr, /* Message to be inserted */ 35 **p_first_ptr, /* First element in list */ 36 **p_last_ptr; /* Last element in list */ 37 { 38 struct fgbstr *temp_ptr; /* Temp holding for pointer */ 39 40 /* MAIN */ 41 42 /* : If no data, return */ 43 if (p_msg_ptr == NULL) 44 return (0); 45 46 /* : Link to previous background message buffers */ 47 if (*p_first_ptr == NULL) 48 { *p_first_ptr = p_msg_ptr; 49 *p_last_ptr = p_msg_ptr; 50 } 51 else 52 { temp_ptr = *p_last_ptr; 53 temp_ptr -> fgb_next = p_msg_ptr; 54 *p_last_ptr = p_msg_ptr; 55 } 56 } 57 ^Z