]> git.lyx.org Git - lyx.git/blob - src/support/systemcall.C
split LyXText::rowlist_ into individual Paragraph::rows_ chunks
[lyx.git] / src / support / systemcall.C
1 /**
2  *  \file systemcall.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Asger Alstrup
7  *
8  * Interface cleaned up by
9  * \author Angus Leeming
10  *
11  * Full author contact details are available in file CREDITS
12  */
13
14 #include <config.h>
15
16 #include "systemcall.h"
17 #include "os.h"
18
19 #include <cstdlib>
20
21 #ifndef CXX_GLOBAL_CSTD
22 using std::system;
23 #endif
24
25 namespace lyx {
26 namespace support {
27
28 // Reuse of instance
29 int Systemcall::startscript(Starttype how, string const & what)
30 {
31         string command = what;
32
33         if (how == DontWait) {
34                 if (os::shell() == os::UNIX) {
35                         command += " &";
36                 } else {
37                         command = "start /min/n " + command;
38                 }
39         }
40
41         return ::system(command.c_str());
42 }
43
44 } // namespace support
45 } // namespace lyx