* Sebastian Hammer, Adam Dickmeiss
*
* $Log: zlogs.c,v $
- * Revision 1.7 1998-01-29 13:40:11 adam
+ * Revision 1.8 1998-04-02 14:35:29 adam
+ * First version of Zebra that works with compiled ASN.1.
+ *
+ * Revision 1.7 1998/01/29 13:40:11 adam
* Better logging for scan service.
*
* Revision 1.6 1997/09/29 09:06:41 adam
{
int of, i;
char str[80];
- for (of = 0; of < t->num_attributes; of++)
+#ifdef ASN_COMPILED
+ int num_attributes = t->attributes->num_attributes;
+#else
+ int num_attributes = t->num_attributes;
+#endif
+
+ for (of = 0; of < num_attributes; of++)
{
Z_AttributeElement *element;
+#ifdef ASN_COMPILED
+ element = t->attributes->attributes[of];
+#else
element = t->attributeList[of];
+#endif
switch (element->which)
{
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: zrpn.c,v $
- * Revision 1.75 1998-03-05 08:45:13 adam
+ * Revision 1.76 1998-04-02 14:35:29 adam
+ * First version of Zebra that works with compiled ASN.1.
+ *
+ * Revision 1.75 1998/03/05 08:45:13 adam
* New result set model and modular ranking system. Moved towards
* descent server API. System information stored as "SGML" records.
*
static int attr_find (AttrType *src, oid_value *attributeSetP)
{
- while (src->major < src->zapt->num_attributes)
+ int num_attributes;
+
+#ifdef ASN_COMPILED
+ num_attributes = src->zapt->attributes->num_attributes;
+#else
+ num_attributes = src->zapt->num_attributes;
+#endif
+ while (src->major < num_attributes)
{
Z_AttributeElement *element;
+#ifdef ASN_COMPILED
+ element = src->zapt->attributes->attributes[src->major];
+#else
element = src->zapt->attributeList[src->major];
+#endif
if (src->type == *element->attributeType)
{
switch (element->which)
r = rset_create (rset_kind_not, &bool_parms);
break;
case Z_Operator_prox:
+#ifdef ASN_COMPILED
+ if (zop->u.prox->which != Z_ProximityOperator_known)
+ {
+ zh->errCode = 132;
+ return NULL;
+ }
+#else
if (zop->u.prox->which != Z_ProxCode_known)
{
zh->errCode = 132;
return NULL;
}
+#endif
+
+#ifdef ASN_COMPILED
+ if (*zop->u.prox->u.known != Z_ProxUnit_word)
+ {
+ char *val = odr_malloc (stream, 16);
+ zh->errCode = 132;
+ zh->errString = val;
+ sprintf (val, "%d", *zop->u.prox->u.known);
+ return NULL;
+ }
+#else
if (*zop->u.prox->proximityUnitCode != Z_ProxUnit_word)
{
char *val = odr_malloc (stream, 16);
sprintf (val, "%d", *zop->u.prox->proximityUnitCode);
return NULL;
}
+#endif
r = rpn_proximity (zh, bool_parms.rset_l, bool_parms.rset_r,
*zop->u.prox->ordered,
(!zop->u.prox->exclusion ? 0 :
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: zebramap.c,v $
- * Revision 1.8 1998-03-05 08:42:44 adam
+ * Revision 1.9 1998-04-02 14:35:30 adam
+ * First version of Zebra that works with compiled ASN.1.
+ *
+ * Revision 1.8 1998/03/05 08:42:44 adam
* Minor changes to zebramap data structures. Query mapping rules changed.
*
* Revision 1.7 1998/02/10 12:03:07 adam
static void attr_init_APT (AttrType *src, Z_AttributesPlusTerm *zapt, int type)
{
-
+#ifdef ASN_COMPILED
+ src->attributeList = zapt->attributes->attributes;
+ src->num_attributes = zapt->attributes->num_attributes;
+#else
src->attributeList = zapt->attributeList;
src->num_attributes = zapt->num_attributes;
+#endif
src->type = type;
src->major = 0;
src->minor = 0;