/* str2qb.c - string to qbuf */
static char *rcsid
= "$Header: /f/osi/psap/RCS/str2qb.c,v 7.3 91/02/22 09:37:10 mrose Interim $";
* $Header: /f/osi/psap/RCS/str2qb.c,v 7.3 91/02/22 09:37:10 mrose Interim $
* Revision 7.3 91/02/22 09:37:10 mrose
* Revision 7.2 90/04/18 08:51:02 mrose
* Revision 7.1 90/02/19 13:09:48 mrose
* Revision 7.0 89/11/23 22:13:49 mrose
* Acquisition, use, and distribution of this module and related
* materials are subject to the restrictions of a license agreement.
* Consult the Preface in the User's Manual for the full terms of
struct qbuf
*str2qb (s
, len
, head
)
register struct qbuf
*qb
,
if ((pb
= (struct qbuf
*) malloc ((unsigned) (sizeof *pb
+ len
))) == NULL
)
if ((qb
= (struct qbuf
*) malloc (sizeof *qb
)) == NULL
) {
qb
-> qb_forw
= qb
-> qb_back
= qb
;
qb
-> qb_data
= NULL
, qb
-> qb_len
= len
;
pb
-> qb_forw
= pb
-> qb_back
= pb
;
pb
-> qb_data
= pb
-> qb_base
;
if ((pb
-> qb_len
= len
) > 0 && s
)
bcopy (s
, pb
-> qb_data
, len
);