From: Adam Dickmeiss Date: Mon, 26 Aug 2002 12:15:35 +0000 (+0000) Subject: Plus signs converted to spaces for database names X-Git-Tag: YAZ.1.9~41 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=a6a8ea2837dd78d21fe036fff4b8d91c0d6e09c8;p=yaz-moved-to-github.git Plus signs converted to spaces for database names --- diff --git a/client/client.c b/client/client.c index ed14f02..0cdb8e2 100644 --- a/client/client.c +++ b/client/client.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2002, Index Data * See the file LICENSE for details. * - * $Id: client.c,v 1.162 2002-07-25 12:52:53 adam Exp $ + * $Id: client.c,v 1.163 2002-08-26 12:15:35 adam Exp $ */ #include @@ -333,13 +333,20 @@ static int cmd_base(char *arg) num_databaseNames = 0; while (1) { + char *cp1; if (!(cp = strchr(arg, ' '))) cp = arg + strlen(arg); if (cp - arg < 1) break; databaseNames[num_databaseNames] = (char *)xmalloc (1 + cp - arg); memcpy (databaseNames[num_databaseNames], arg, cp - arg); - databaseNames[num_databaseNames++][cp - arg] = '\0'; + databaseNames[num_databaseNames][cp - arg] = '\0'; + + for (cp1 = databaseNames[num_databaseNames]; *cp1 ; cp1++) + if (*cp1 == '+') + *cp1 = ' '; + num_databaseNames++; + if (!*cp) break; arg = cp+1;