X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fzsets.c;h=6394f3da5dac9cc6defcaddff6568f30fd1d575e;hb=a17b23c8615d81523afa6d124d2f91e237f06605;hp=b46f057bced97f47e8858a3a2906fe49cad204a8;hpb=e19bd45069a282b054015f9cf88e109968b9fa7f;p=idzebra-moved-to-github.git diff --git a/index/zsets.c b/index/zsets.c index b46f057..6394f3d 100644 --- a/index/zsets.c +++ b/index/zsets.c @@ -1,10 +1,16 @@ /* - * Copyright (C) 1994-1998, Index Data + * Copyright (C) 1994-1999, Index Data * All rights reserved. * Sebastian Hammer, Adam Dickmeiss * * $Log: zsets.c,v $ - * Revision 1.21 1998-11-16 16:03:46 adam + * Revision 1.23 1999-05-26 07:49:13 adam + * C++ compilation. + * + * Revision 1.22 1999/02/02 14:51:15 adam + * Updated WIN32 code specific sections. Changed header. + * + * Revision 1.21 1998/11/16 16:03:46 adam * Moved loggin utilities to Yaz. Was implemented in file zlogs.c. * * Revision 1.20 1998/11/16 10:10:53 adam @@ -82,7 +88,7 @@ */ #include #include -#ifdef WINDOWS +#ifdef WIN32 #include #else #include @@ -168,18 +174,19 @@ ZebraSet resultSetAdd (ZebraHandle zh, const char *name, int ov) else { logf (LOG_DEBUG, "adding result set %s", name); - s = xmalloc (sizeof(*s)); + s = (ZebraSet) xmalloc (sizeof(*s)); s->next = zh->sets; zh->sets = s; - s->name = xmalloc (strlen(name)+1); + s->name = (char *) xmalloc (strlen(name)+1); strcpy (s->name, name); - s->sort_info = xmalloc (sizeof(*s->sort_info)); + s->sort_info = (struct zset_sort_info *) + xmalloc (sizeof(*s->sort_info)); s->sort_info->max_entries = 1000; - s->sort_info->entries = + s->sort_info->entries = (struct zset_sort_entry **) xmalloc (sizeof(*s->sort_info->entries) * s->sort_info->max_entries); - s->sort_info->all_entries = + s->sort_info->all_entries = (struct zset_sort_entry *) xmalloc (sizeof(*s->sort_info->all_entries) * s->sort_info->max_entries); for (i = 0; i < s->sort_info->max_entries; i++) @@ -246,7 +253,7 @@ ZebraPosSet zebraPosSetCreate (ZebraHandle zh, const char *name, return NULL; if (!(rset = sset->rset)) return NULL; - sr = xmalloc (sizeof(*sr) * num); + sr = (ZebraPosSet) xmalloc (sizeof(*sr) * num); for (i = 0; icontrol = xmalloc (sizeof(*p->control)); + ZebraRankClass p = (ZebraRankClass) xmalloc (sizeof(*p)); + p->control = (struct rank_control *) xmalloc (sizeof(*p->control)); memcpy (p->control, ctrl, sizeof(*p->control)); p->control->name = xstrdup (ctrl->name); p->init_flag = 0;