X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=include%2Fccl.h;h=b8ceeb1f0612a8d87b0c727c28f948faec25374e;hp=816a3950842b99990ed0fffe78d48256aaadf22d;hb=46ed30d0d83dd1b21e58a4db365a60aefaa5aad8;hpb=85a2e7affad79fd8bd59b403ba7b5f7867d60523 diff --git a/include/ccl.h b/include/ccl.h index 816a395..b8ceeb1 100644 --- a/include/ccl.h +++ b/include/ccl.h @@ -46,7 +46,14 @@ * CCL - header file * * $Log: ccl.h,v $ - * Revision 1.5 1997-04-30 08:52:08 quinn + * Revision 1.7 1997-09-01 08:49:47 adam + * New windows NT/95 port using MSV5.0. To export DLL functions the + * YAZ_EXPORT modifier was added. Defined in yconfig.h. + * + * Revision 1.6 1997/05/14 06:53:37 adam + * C++ support. + * + * Revision 1.5 1997/04/30 08:52:08 quinn * Null * * Revision 1.4 1996/10/11 15:02:26 adam @@ -88,6 +95,10 @@ #ifndef CCL_H #define CCL_H +#ifdef __cplusplus +extern "C" { +#endif + /* CCL error numbers */ #define CCL_ERR_OK 0 #define CCL_ERR_TERM_EXPECTED 1 @@ -110,14 +121,16 @@ struct ccl_rpn_attr { int value; }; +#define CCL_RPN_AND 1 +#define CCL_RPN_OR 2 +#define CCL_RPN_NOT 3 +#define CCL_RPN_TERM 4 +#define CCL_RPN_SET 5 +#define CCL_RPN_PROX 6 + /* RPN tree structure */ struct ccl_rpn_node { - enum rpn_node_kind { - CCL_RPN_AND, CCL_RPN_OR, CCL_RPN_NOT, - CCL_RPN_TERM, - CCL_RPN_SET, - CCL_RPN_PROX - } kind; + int kind; union { struct ccl_rpn_node *p[2]; struct { @@ -190,7 +203,7 @@ typedef struct ccl_qualifiers *CCL_bibset; /* CCL token */ struct ccl_token { char kind; - char len; + size_t len; const char *name; struct ccl_token *next; struct ccl_token *prev; @@ -262,6 +275,12 @@ int ccl_stricmp (const char *s1, const char *s2); int ccl_memicmp (const char *s1, const char *s2, size_t n); /* Search for qualifier 'name' in set 'b'. */ -struct ccl_rpn_attr *ccl_qual_search (CCL_bibset b, const char *name, int len); +struct ccl_rpn_attr *ccl_qual_search (CCL_bibset b, const char *name, + size_t len); + +#ifdef __cplusplus +} +#endif + #endif