From 8504149fc1c70ecc5c7743c3522ae70de68b0694 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 27 Feb 2019 10:07:57 +0200 Subject: Factor out Windows command line argument quoting to utility function --- libbutl/process.mxx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libbutl/process.mxx') 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; -- cgit v1.1