X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=client%2Fclient.c;h=b5921ef835dea93c06dc0d3e35df6ae67c012a9d;hb=4ce7bffcae2b1faaa0fb5d74eca9aeeb7f6d0c6e;hp=38ac3d78cd43a5fdb32b775f77437f3fae2ec7c5;hpb=7ef1b50f481cda83d012cc3d69d83f9313836f1f;p=yaz-moved-to-github.git diff --git a/client/client.c b/client/client.c index 38ac3d7..b5921ef 100644 --- a/client/client.c +++ b/client/client.c @@ -197,11 +197,12 @@ const char* query_type_as_string(QueryType q) } } -static void do_hex_dump(const char* buf, int len) +static void do_hex_dump(const char* buf, size_t len) { if (hex_dump) { - int i,x; + size_t i; + int x; for (i = 0; i < len ; i = i+16 ) { printf(" %4.4d ",i); @@ -590,7 +591,7 @@ static int parse_cmd_doc(const char **arg, ODR out, char **buf, int *len) } else if ((*arg)[0] == '<') { - long fsize; + size_t fsize; FILE *inf; const char *fname; const char *arg_start = ++(*arg); @@ -3914,7 +3915,7 @@ static void handle_srw_record(Z_SRW_record *rec) if (rec->recordData_buf && rec->recordData_len) { if (fwrite(rec->recordData_buf, 1, rec->recordData_len, stdout) != - rec->recordData_len) + (size_t) (rec->recordData_len)) { printf("write to stdout failed\n"); } @@ -4885,12 +4886,12 @@ static void client(void) static void show_version(void) { - char vstr[20]; + char vstr[20], sha1_str[41]; - yaz_version(vstr, 0); - printf("YAZ version: %s\n", YAZ_VERSION); - if (strcmp(vstr, YAZ_VERSION)) - printf("YAZ DLL/SO: %s\n", vstr); + yaz_version(vstr, sha1_str); + printf("YAZ version: %s %s\n", YAZ_VERSION, YAZ_VERSION_SHA1); + if (strcmp(sha1_str, YAZ_VERSION_SHA1)) + printf("YAZ DLL/SO: %s %s\n", vstr, sha1_str); exit(0); }