X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=include%2Frset.h;h=2cfb23d94f8b5168875593c4f74d995c31765761;hb=067b55382bc9916b3f7dcd473512c703d4de4a5d;hp=e4a8bee6e88b3e7921a25fc0940c005af56b14f1;hpb=06f0594e0d2aad96f30e1ac5f82b7d13a79b5966;p=idzebra-moved-to-github.git diff --git a/include/rset.h b/include/rset.h index e4a8bee..2cfb23d 100644 --- a/include/rset.h +++ b/include/rset.h @@ -1,10 +1,21 @@ /* - * Copyright (C) 1994-1995, Index Data I/S + * Copyright (C) 1994-1997, Index Data I/S * All rights reserved. * Sebastian Hammer, Adam Dickmeiss * * $Log: rset.h,v $ - * Revision 1.10 1995-10-12 12:40:36 adam + * Revision 1.12 1997-09-05 15:30:03 adam + * Changed prototype for chr_map_input - added const. + * Added support for C++, headers uses extern "C" for public definitions. + * + * Revision 1.11 1995/12/11 09:07:53 adam + * New rset member 'flag', that holds various flags about a result set - + * currently 'volatile' (set is register dependent) and 'ranked' (set is + * ranked). + * New set types sand/sor/snot. They handle and/or/not for ranked and + * semi-ranked result sets. + * + * Revision 1.10 1995/10/12 12:40:36 adam * Private info (buf) moved from struct rset_control to struct rset. * Member control in rset is statically set in rset_create. * @@ -46,6 +57,9 @@ #include +#ifdef __cplusplus +extern "C" { +#endif typedef void *RSFD; typedef struct rset *RSET; @@ -53,7 +67,8 @@ typedef struct rset *RSET; typedef struct rset_control { char *desc; /* text description of set type (for debugging) */ - void *(*f_create)(const struct rset_control *sel, void *parms); + void *(*f_create)(const struct rset_control *sel, void *parms, + int *flags); RSFD (*f_open)(RSET ct, int wflag); void (*f_close)(RSFD rfd); void (*f_delete)(RSET ct); @@ -67,6 +82,7 @@ typedef struct rset_control typedef struct rset { const rset_control *control; + int flags; void *buf; } rset; @@ -101,4 +117,17 @@ void rset_delete(RSET rs); /* int rset_score(RSET rs, int *buf); */ #define rset_score(rs, fd, score) ((*(rs)->control->f_score)((fd), (score))) +/* int rset_type (RSET) */ +#define rset_type(rs) ((rs)->control->desc) + +#define RSET_FLAG_VOLATILE 1 +#define RSET_FLAG_RANKED 2 + +#define rset_is_volatile(rs) ((rs)->flags & RSET_FLAG_VOLATILE) +#define rset_is_ranked(rs) ((rs)->flags & RSET_FLAG_RANKED) + +#ifdef __cplusplus +} +#endif + #endif