X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=include%2Fd1_attset.h;h=013bfa369244462381db8ed6979e77d25b1fdf64;hb=0d9eca26da6a9369bb00efd75a9472380526f547;hp=6989b82940436f17a81731dddd81a5578cb475e0;hpb=46ed30d0d83dd1b21e58a4db365a60aefaa5aad8;p=yaz-moved-to-github.git diff --git a/include/d1_attset.h b/include/d1_attset.h index 6989b82..013bfa3 100644 --- a/include/d1_attset.h +++ b/include/d1_attset.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, Index Data. + * Copyright (c) 1995-1998, Index Data. * * Permission to use, copy, modify, distribute, and sell this software and * its documentation, in whole or in part, for any purpose, is hereby granted, @@ -51,27 +51,38 @@ typedef struct data1_local_attribute struct data1_local_attribute *next; } data1_local_attribute; -typedef struct data1_att +typedef struct data1_attset data1_attset; +typedef struct data1_att data1_att; +typedef struct data1_attset_child data1_attset_child; + +struct data1_att { - struct data1_attset *parent; /* attribute set */ + data1_attset *parent; /* attribute set */ char *name; /* symbolic name of this attribute */ int value; /* attribute value */ data1_local_attribute *locals; /* local index values */ - struct data1_att *next; -} data1_att; + data1_att *next; +}; + +struct data1_attset_child { + data1_attset *child; + data1_attset_child *next; +}; -typedef struct data1_attset +struct data1_attset { char *name; /* symbolic name */ oid_value reference; /* external ID of attset */ - int ordinal; /* attset identification in index */ data1_att *atts; /* attributes */ - struct data1_attset *children; /* included attset */ - struct data1_attset *next; /* sibling */ -} data1_attset; + data1_attset_child *children; /* included attset */ + data1_attset *next; /* sibling */ +}; + +typedef struct data1_handle_info *data1_handle; -YAZ_EXPORT data1_att *data1_getattbyname(data1_attset *s, char *name); -YAZ_EXPORT data1_attset *data1_read_attset(char *file); +YAZ_EXPORT data1_att *data1_getattbyname(data1_handle dh, data1_attset *s, + char *name); +YAZ_EXPORT data1_attset *data1_read_attset(data1_handle dh, const char *file); #ifdef __cplusplus }