diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2000-12-20 19:54:07 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2000-12-20 19:54:07 (GMT) |
commit | a0758fd182732a710364bdf3ebf5c2fb87b0ff70 (patch) | |
tree | 1fae01f2e80d65a57788a3f11ab9fa7463c22ec9 /src/util.cpp | |
parent | 00415514455991a9ff44b926c50adda994128924 (diff) | |
download | Doxygen-a0758fd182732a710364bdf3ebf5c2fb87b0ff70.zip Doxygen-a0758fd182732a710364bdf3ebf5c2fb87b0ff70.tar.gz Doxygen-a0758fd182732a710364bdf3ebf5c2fb87b0ff70.tar.bz2 |
Release-1.2.3-20001220
Diffstat (limited to 'src/util.cpp')
-rw-r--r-- | src/util.cpp | 61 |
1 files changed, 36 insertions, 25 deletions
diff --git a/src/util.cpp b/src/util.cpp index dd04fde..45e1e07 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -114,9 +114,10 @@ void TextGeneratorXMLImpl::writeLink(const char *extRef,const char *file, /*! Implements an interruptable system call on Unix/Windows */ -int iSystem(const char *command,const char *args) +int iSystem(const char *command,const char *args,bool isBatchFile) { #ifndef _WIN32 + isBatchFile=isBatchFile; /*! taken from the system() manpage on my Linux box */ int pid,status; @@ -149,30 +150,40 @@ int iSystem(const char *command,const char *args) } } #else - SHELLEXECUTEINFO sInfo = { - sizeof(SHELLEXECUTEINFO), /* structure size */ - SEE_MASK_NOCLOSEPROCESS, /* leave the process running */ - NULL, /* window handle */ - NULL, /* action to perform: open */ - command, /* file to execute */ - args, /* argument list */ - NULL, /* use current working dir */ - SW_HIDE, /* minimize on start-up */ - 0, /* application instance handle */ - NULL, /* ignored: id list */ - NULL, /* ignored: class name */ - NULL, /* ignored: key class */ - 0, /* ignored: hot key */ - NULL, /* ignored: icon */ - NULL /* resulting application handle */ - }; - if (!ShellExecuteEx(&sInfo)) - { - return -1; - } - else if (sInfo.hProcess) /* executable was launched, wait for it to finish */ - { - WaitForSingleObject(sInfo.hProcess,INFINITE); + if (isBatchFile) + { + QCString fullCmd = command; + fullCmd += " "; + fullCmd += args; + return system(fullCmd); + } + else + { + SHELLEXECUTEINFO sInfo = { + sizeof(SHELLEXECUTEINFO), /* structure size */ + SEE_MASK_NOCLOSEPROCESS, /* leave the process running */ + NULL, /* window handle */ + NULL, /* action to perform: open */ + command, /* file to execute */ + args, /* argument list */ + NULL, /* use current working dir */ + SW_HIDE, /* minimize on start-up */ + 0, /* application instance handle */ + NULL, /* ignored: id list */ + NULL, /* ignored: class name */ + NULL, /* ignored: key class */ + 0, /* ignored: hot key */ + NULL, /* ignored: icon */ + NULL /* resulting application handle */ + }; + if (!ShellExecuteEx(&sInfo)) + { + return -1; + } + else if (sInfo.hProcess) /* executable was launched, wait for it to finish */ + { + WaitForSingleObject(sInfo.hProcess,INFINITE); + } } return 0; //return system(command); |