X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fsc.c;h=e0c1ec1f8e521cfc44618a6f743325121e1a5282;hp=797f9a2e48b5532f7ffbdfb20ac5ac29e445736a;hb=4efb9de61a4284830d3dde10a992a42067879c84;hpb=bf95c509245f5cb4025ef2db348d5f7ace3b5994;ds=sidebyside diff --git a/src/sc.c b/src/sc.c index 797f9a2..e0c1ec1 100644 --- a/src/sc.c +++ b/src/sc.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2008 Index Data + * Copyright (C) 1995-2009 Index Data * See the file LICENSE for details. */ @@ -268,7 +268,11 @@ int yaz_sc_program(yaz_sc_t s, int argc, char **argv, for (i = 1; i < argc; i++) { wrbuf_puts(w, " "); + if (strchr(argv[i], ' ')) + wrbuf_puts(w, "\""); wrbuf_puts(w, argv[i]); + if (strchr(argv[i], ' ')) + wrbuf_puts(w, "\""); } wrbuf_puts(w, " -run \""); wrbuf_puts(w, cwdstr); @@ -373,6 +377,7 @@ void yaz_sc_destroy(yaz_sc_t *s) /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab