X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=client%2Fclient.c;h=a2899cf5a644db801c9b42c08fb7965e99a7fe1d;hb=5b690aebb8dc2d05cad8f668de8fd821a1c231fa;hp=78e7f8a1ba964dfef253f4bf942715cab140f714;hpb=b28230ab11ea960e0bf0ea04ceeaf88131ab2f02;p=yaz-moved-to-github.git diff --git a/client/client.c b/client/client.c index 78e7f8a..a2899cf 100644 --- a/client/client.c +++ b/client/client.c @@ -2,12 +2,19 @@ * Copyright (c) 1995-2002, Index Data * See the file LICENSE for details. * - * $Id: client.c,v 1.170 2002-09-17 21:19:38 adam Exp $ + * $Id: client.c,v 1.172 2002-10-04 19:05:36 adam Exp $ */ #include #include #include +#include + +#ifdef WIN32 +#include +#define S_ISREG(x) (x & _S_IFREG) +#define S_ISDIR(x) (x & _S_IFDIR) +#endif #include @@ -106,7 +113,7 @@ int rl_attempted_completion_over = 0; #define maxOtherInfosSupported 10 struct { int oidval; - char* value; + char* value; } extraOtherInfos[maxOtherInfosSupported]; @@ -1568,7 +1575,7 @@ static int cmd_update(char *arg) if (S_ISREG(status.st_mode) && (inf = fopen(fname, "r"))) { size_t len = status.st_size; - char *buf = xmalloc (len); + char *buf = (char *) xmalloc (len); fread (buf, 1, len, inf); @@ -1632,8 +1639,9 @@ static int cmd_update(char *arg) notToKeep->elements[0]->which = Z_IUSuppliedRecords_elem_opaque; if (*recid) { - notToKeep->elements[0]->u.opaque = odr_malloc (out, sizeof(Odr_oct)); - notToKeep->elements[0]->u.opaque->buf = recid; + notToKeep->elements[0]->u.opaque = (Odr_oct *) + odr_malloc (out, sizeof(Odr_oct)); + notToKeep->elements[0]->u.opaque->buf = (unsigned char *) recid; notToKeep->elements[0]->u.opaque->size = strlen(recid); notToKeep->elements[0]->u.opaque->len = strlen(recid); } @@ -2538,7 +2546,7 @@ int cmd_register_oid(char* args) { {"schema",CLASS_SCHEMA}, {"tagset",CLASS_TAGSET}, {"general",CLASS_GENERAL}, - {0,0} + {0,(enum oid_class) 0} }; char oname_str[101], oclass_str[101], oid_str[101]; char* name; @@ -2860,12 +2868,22 @@ int cmd_list_otherinfo(char* args) } if(extraOtherInfos[i].oidval != -1) - printf(" otherinfo %d %s %s\n",i,yaz_z3950_oid_value_to_str(extraOtherInfos[i].oidval,CLASS_RECSYN), extraOtherInfos[i].value); + printf(" otherinfo %d %s %s\n", + i, + yaz_z3950_oid_value_to_str( + (enum oid_value) extraOtherInfos[i].oidval, + CLASS_RECSYN), + extraOtherInfos[i].value); } else { for(i=0; i