DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T q

⟦4b8b237ad⟧ TextFile

    Length: 1132 (0x46c)
    Types: TextFile
    Names: »qb2str.c«

Derivation

└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
    └─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z« 
        └─⟦de7628f85⟧ 
            └─⟦this⟧ »isode-6.0/psap/qb2str.c« 

TextFile

/* qb2str.c - qbuf to string */

#ifndef	lint
static char *rcsid = "$Header: /f/osi/psap/RCS/qb2str.c,v 7.0 89/11/23 22:13:30 mrose Rel $";
#endif

/* 
 * $Header: /f/osi/psap/RCS/qb2str.c,v 7.0 89/11/23 22:13:30 mrose Rel $
 *
 *
 * $Log:	qb2str.c,v $
 * Revision 7.0  89/11/23  22:13:30  mrose
 * Release 6.0
 * 
 */

/*
 *				  NOTICE
 *
 *    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
 *    this agreement.
 *
 */


/* LINTLIBRARY */

#include <stdio.h>
#include "psap.h"

/* \f

 */

char   *qb2str (q)
register struct qbuf *q;
{
    register int    len;
    register char  *b,
                   *d;
    register struct qbuf   *p;

    len = 0;
    for (p = q -> qb_forw; p != q; p = p -> qb_forw)
	len += p -> qb_len;
    q -> qb_len = len;

    if ((b = d = malloc ((unsigned) (len + 1))) == NULL)
	return NULLCP;

    for (p = q -> qb_forw; p != q; p = p -> qb_forw) {
	bcopy (p -> qb_data, d, p -> qb_len);
	d += p -> qb_len;
    }
    *d = NULL;

    return b;
}