X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=retrieval%2Fd1_espec.c;h=0f36614fe8560f2bdbd66af40f51f7c26033aa69;hp=d164908f6746bdef813ec5e3f8cc67735e0307bc;hb=79bf9f1b8b224b6b7323b280fca704591ac17324;hpb=6517fa53d35512887780fd07de5667940da18a9e diff --git a/retrieval/d1_espec.c b/retrieval/d1_espec.c index d164908..0f36614 100644 --- a/retrieval/d1_espec.c +++ b/retrieval/d1_espec.c @@ -1,10 +1,17 @@ /* - * Copyright (c) 1995, Index Data. + * Copyright (c) 1995-1997, Index Data. * See the file LICENSE for details. * Sebastian Hammer, Adam Dickmeiss * * $Log: d1_espec.c,v $ - * Revision 1.9 1997-09-17 12:10:35 adam + * Revision 1.11 1997-09-29 13:18:59 adam + * Added function, oid_ent_to_oid, to replace the function + * oid_getoidbyent, which is not thread safe. + * + * Revision 1.10 1997/09/29 07:21:10 adam + * Added typecast to avoid warnings on MSVC. + * + * Revision 1.9 1997/09/17 12:10:35 adam * YAZ version 1.4. * * Revision 1.8 1997/09/05 09:50:56 adam @@ -52,11 +59,12 @@ static Z_Variant *read_variant(int argc, char **argv, ODR o) Z_Variant *r = odr_malloc(o, sizeof(*r)); oident var1; int i; + int oid[OID_SIZE]; var1.proto = PROTO_Z3950; var1.oclass = CLASS_VARSET; var1.value = VAL_VAR1; - r->globalVariantSetId = odr_oiddup(o, oid_getoidbyent(&var1)); + r->globalVariantSetId = odr_oiddup(o, oid_ent_to_oid(&var1, oid)); if (argc) r->triples = odr_malloc(o, sizeof(Z_Triple*) * argc); @@ -295,7 +303,7 @@ Z_Espec1 *data1_read_espec1 (data1_handle dh, const char *file, ODR o) if (!res->elements) res->elements = odr_malloc(o, size_esn = 24*sizeof(er)); - else if (res->num_elements >= size_esn/sizeof(er)) + else if (res->num_elements >= (int) (size_esn/sizeof(er))) { size_esn *= 2; if (o)