X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=client%2Fclient.c;h=9f44998e74778694729ce93c7fb0762edb58ccb3;hb=4602e6f66713b5c44cebd5a8deb2790e2cdea91e;hp=b062912a6453de2a3cd70efd8121af747aab2a5a;hpb=dbb6de2b356dec17a7be4f118c30dad487edac52;p=yaz-moved-to-github.git diff --git a/client/client.c b/client/client.c index b062912..9f44998 100644 --- a/client/client.c +++ b/client/client.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2005, Index Data ApS * See the file LICENSE for details. * - * $Id: client.c,v 1.274 2005-02-25 17:03:41 adam Exp $ + * $Id: client.c,v 1.276 2005-04-20 12:59:51 adam Exp $ */ #include @@ -2085,7 +2085,7 @@ static int cmd_update_common(const char *arg, int version) FILE *inf; struct stat status; stat (fname, &status); - if (S_ISREG(status.st_mode) && (inf = fopen(fname, "r"))) + if (S_ISREG(status.st_mode) && (inf = fopen(fname, "rb"))) { size_t len = status.st_size; char *buf = (char *) xmalloc (len); @@ -4447,6 +4447,12 @@ int main(int argc, char **argv) strcpy (open_command, "open "); strcat (open_command, arg); } + else + { + fprintf(stderr, "%s: Specify at most one server address\n", + prog); + exit(1); + } break; case 'd': dump_file_prefix = arg;