|
|
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 b
Length: 811 (0x32b)
Types: TextFile
Names: »boolean.c«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
└─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z«
└─⟦de7628f85⟧
└─⟦this⟧ »isode-6.0/dsap/common/boolean.c«
/* SYNTAX boolean ::= 'TRUE' | 'FALSE' */
#include "quipu/util.h"
#include "quipu/attr.h"
#include "psap.h"
strprint();
sfree();
pstrcmp();
static PE boolenc (x)
char *x;
{
return (bool2prim (lexequ (x,"TRUE") ? 0 : 1));
}
static char * booldec (pe)
PE pe;
{
if (! test_prim_pe (pe,PE_CLASS_UNIV,PE_PRIM_BOOL))
return (NULLCP);
if (prim2flag (pe) == 1)
return (strdup ("TRUE"));
else
return (strdup ("FALSE"));
}
static char * boolget (x)
char * x;
{
if ((lexequ (x,"TRUE") == 0) || (lexequ (x,"FALSE") == 0))
return (strdup(x));
parse_error ("TRUE or FALSE expected (%s)",x);
return (NULLCP);
}
boolean_syntax ()
{
(void) add_attribute_syntax ("boolean",
(IFP) boolenc, (IFP) booldec,
(IFP) boolget, strprint,
(IFP) strdup, pstrcmp,
sfree, NULLCP,
NULLIFP, FALSE);
}