-# Copyright (C) 1994, Index Data I/S
+# Copyright (C) 1994-1996, Index Data I/S
# All rights reserved.
# Sebastian Hammer, Adam Dickmeiss
-# $Id: Makefile,v 1.20 1996-05-22 08:36:07 adam Exp $
+# $Id: Makefile,v 1.21 1996-08-12 14:10:34 adam Exp $
SHELL=/bin/sh
INCLUDE=-I../include -I.
/*
- * Copyright (c) 1995, Index Data.
+ * Copyright (c) 1995-1996, Index Data.
* See the file LICENSE for details.
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: pquery.c,v $
- * Revision 1.9 1996-03-15 11:03:46 adam
+ * Revision 1.10 1996-08-12 14:10:35 adam
+ * New function p_query_attset to define default attribute set.
+ *
+ * Revision 1.9 1996/03/15 11:03:46 adam
* Attribute set can be set globally for a query with the @attrset
* operator. The @attr operator has an optional attribute-set specifier
* that sets the attribute set locally.
#include <pquery.h>
+static oid_value p_query_dfset = VAL_NONE;
+
static const char *query_buf;
static const char *query_lex_buf;
static int query_lex_len;
lex ();
}
if (topSet == VAL_NONE)
+ topSet = p_query_dfset;
+ if (topSet == VAL_NONE)
topSet = VAL_BIB1;
oset.proto = proto;
oset.oclass = CLASS_ATTSET;
lex ();
}
if (topSet == VAL_NONE)
+ topSet = p_query_dfset;
+ if (topSet == VAL_NONE)
topSet = VAL_BIB1;
oset.proto = proto;
oset.oclass = CLASS_ATTSET;
return rpn_term (o, proto, num_attr, attr_list, attr_set);
}
+int p_query_attset (const char *arg)
+{
+ p_query_dfset = oid_getvalbyname (arg);
+ return (p_query_dfset == VAL_NONE) ? -1 : 0;
+}
+