X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fsc.c;h=ef5d097dcbed3a27b48d0083851608ee28186801;hp=3eb6e12b17d3a96d48f8c4770ba16a7ea5e1b863;hb=7d7e192def2fef342d235ea894eddb1e89edd714;hpb=2788a4851b551e1a3efb320a2878b809f2d8a9d7 diff --git a/src/sc.c b/src/sc.c index 3eb6e12..ef5d097 100644 --- a/src/sc.c +++ b/src/sc.c @@ -1,12 +1,14 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2009 Index Data + * Copyright (C) 1995-2011 Index Data * See the file LICENSE for details. */ - /** * \file sc.c * \brief Windows Service Control */ +#if HAVE_CONFIG_H +#include +#endif #ifdef WIN32 #include @@ -268,7 +270,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 +379,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