|
|
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 a
Length: 1536 (0x600)
Types: TextFile
Names: »as_print.c«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
└─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z«
└─⟦de7628f85⟧
└─⟦this⟧ »isode-6.0/dsap/common/as_print.c«
#include "quipu/util.h"
#include "quipu/attrvalue.h"
static Attr_Sequence eptr;
#define foreach(a) for(eptr = a; eptr != NULLATTR; eptr=eptr->attr_link)
extern AttributeType last_at;
as_comp_print (ps,as,format)
PS ps;
Attr_Sequence as;
int format;
{
AV_Sequence avs;
char buffer [LINESIZE];
extern int oidformat;
char * attr2name_aux();
if (as!=NULLATTR) {
if (as->attr_type.at_table == NULLTABLE_ATTR)
(void) AttrT_decode(&as->attr_type);
last_at = &as->attr_type;
if (as->attr_type.at_table == NULLTABLE_ATTR)
/* can't decode */
(void) sprintf (buffer,"%s",oid2name (as->attr_type.at_oid,oidformat));
else {
if (format == READOUT)
(void) sprintf (buffer,"%s",attr2name (as->attr_type.at_table,oidformat));
else
(void) sprintf (buffer,"%s",attr2name_aux (as->attr_type.at_table));
}
if (split_attr (as))
if ((as->attr_value == NULLAV) && (format != READOUT))
ps_printf (ps, "%s=\n", buffer);
else
for (avs = as->attr_value; avs != NULLAV; avs = avs->avseq_next) {
if (format == READOUT)
ps_printf (ps, "%-21s - ", buffer);
else
ps_printf (ps, "%s= ", buffer);
avs_comp_print (ps, avs, format);
ps_print (ps, "\n");
}
else {
if (format == READOUT)
ps_printf (ps, "%-21s - ", buffer);
else
ps_printf (ps, "%s= ", buffer);
avs_print (ps,as->attr_value,format);
}
}
}
as_print (ps,as,format)
Attr_Sequence as;
PS ps;
int format;
{
if ( as != NULLATTR )
foreach (as)
as_comp_print (ps,eptr,format);
}