|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T p
Length: 1771 (0x6eb)
Types: TextFile
Names: »pa2str.c«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
└─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z«
└─⟦de7628f85⟧
└─⟦this⟧ »isode-6.0/compat/pa2str.c«
/* pa2str.c - pretty-print PSAPaddr */
#ifndef lint
static char *rcsid = "$Header: /f/osi/compat/RCS/pa2str.c,v 7.0 89/11/30 20:55:02 mrose Exp $";
#endif
/*
* $Header: /f/osi/compat/RCS/pa2str.c,v 7.0 89/11/30 20:55:02 mrose Exp $
*
*
* $Log: pa2str.c,v $
* Revision 7.0 89/11/30 20:55:02 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 <ctype.h>
#include <stdio.h>
#include "general.h"
#include "manifest.h"
#include "isoaddrs.h"
/* \f
Presentation Address to String */
char *pa2str (px)
register struct PSAPaddr *px;
{
register char *bp;
struct PSAPaddr pas;
register struct PSAPaddr *pa = &pas;
register struct TSAPaddr *ta = &pa -> pa_addr.sa_addr;
static char buffer[BUFSIZ];
bp = buffer;
*pa = *px; /* struct copy */
if (ta -> ta_selectlen > 0
&& ta -> ta_selectlen < sizeof ta -> ta_selector) {
register char *dp,
*ep;
register struct TSAPaddr *tz;
for (ep = (dp = ta -> ta_selector) + ta -> ta_selectlen, *ep = NULL;
dp < ep;
dp++)
if (!isprint (*dp) && *dp != ' ')
break;
if (dp >= ep && (tz = str2taddr (ta -> ta_selector))) {
pa -> pa_addr.sa_addr = *tz; /* struct copy */
(void) sprintf (bp, "%s through TS bridge at ",
paddr2str (pa, NULLNA));
bp += strlen (bp);
bzero ((char *) pa, sizeof *pa);
*ta = px -> pa_addr.sa_addr; /* struct copy */
ta -> ta_selectlen = 0;
}
}
(void) strcpy (bp, paddr2str (pa, NULLNA));
return buffer;
}