* 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 <stdio.h>
#include <stdlib.h>
#include <time.h>
+#include <ctype.h>
+
+#ifdef WIN32
+#include <io.h>
+#define S_ISREG(x) (x & _S_IFREG)
+#define S_ISDIR(x) (x & _S_IFDIR)
+#endif
#include <yaz/yaz-util.h>
#define maxOtherInfosSupported 10
struct {
int oidval;
- char* value;
+ char* value;
} extraOtherInfos[maxOtherInfosSupported];
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);
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);
}
{"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;
}
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<maxOtherInfosSupported; ++i) {
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);
}
}
}
- if(!cmd[i].local_tabcompletes) {
- cmd[i].local_tabcompletes = calloc(1,sizeof(char**));
- }
+ if(!cmd[i].local_tabcompletes)
+ cmd[i].local_tabcompletes = (char **) calloc(1,sizeof(char**));
num_of_tabs=0;
num_of_tabs++;
}
- cmd[i].local_tabcompletes =
+ cmd[i].local_tabcompletes = (char **)
realloc(cmd[i].local_tabcompletes,(num_of_tabs+2)*sizeof(char**));
tabslist=cmd[i].local_tabcompletes;
tabslist[num_of_tabs]=strdup(tabargument);