From: Adam Dickmeiss Date: Mon, 27 Jan 2003 21:31:35 +0000 (+0000) Subject: Don't set syntax to none if bad syntax is supplied X-Git-Tag: YAZ.2.0~55 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=650cc0539b6a484eba203949cb43a08b9084504d;p=yaz-moved-to-github.git Don't set syntax to none if bad syntax is supplied --- diff --git a/client/client.c b/client/client.c index 639feca..bb3b465 100644 --- a/client/client.c +++ b/client/client.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2003, Index Data * See the file LICENSE for details. * - * $Id: client.c,v 1.178 2003-01-06 08:20:26 adam Exp $ + * $Id: client.c,v 1.179 2003-01-27 21:31:35 adam Exp $ */ #include @@ -2181,17 +2181,19 @@ int cmd_schema(char *arg) int cmd_format(char *arg) { + oid_value nsyntax; if (!arg || !*arg) { printf("Usage: format \n"); return 0; } - recordsyntax = oid_getvalbyname (arg); - if (recordsyntax == VAL_NONE) + nsyntax = oid_getvalbyname (arg); + if (strcmp(arg, "none") && nsyntax == VAL_NONE) { printf ("unknown record syntax\n"); return 0; } + recordsyntax = nsyntax; return 1; }