aboutsummaryrefslogtreecommitdiff
path: root/libbutl/process.mxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-02-27 10:07:57 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-02-27 10:07:57 +0200
commit8504149fc1c70ecc5c7743c3522ae70de68b0694 (patch)
tree530728c0b8cfa88edbde4c638d2adec77ae541c0 /libbutl/process.mxx
parent2cec5d9c34dd880c732253c2129ce99524d01a1b (diff)
Factor out Windows command line argument quoting to utility function
Diffstat (limited to 'libbutl/process.mxx')
-rw-r--r--libbutl/process.mxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/libbutl/process.mxx b/libbutl/process.mxx
index 8f9d2de..c18ae43 100644
--- a/libbutl/process.mxx
+++ b/libbutl/process.mxx
@@ -462,6 +462,16 @@ LIBBUTL_MODEXPORT namespace butl
static void
print (std::ostream&, const char* const args[], size_t n = 0);
+ // Quote and escape the specified command line argument. Return the
+ // original string if neither is necessary and a pointer to the provided
+ // buffer string containing the escaped version otherwise.
+ //
+#ifdef _WIN32
+ static const char*
+ quote_argument (const char*, std::string& buffer);
+#endif
+
+
public:
id_type
id () const;