1+ // Based on the https://github.com/arun11299/cpp-subprocess project.
2+
13/* !
24
3- Documentation for C++ subprocessing libraray .
5+ Documentation for C++ subprocessing library .
46
57@copyright The code is licensed under the [MIT
68 License](http://opensource.org/licenses/MIT):
@@ -106,7 +108,7 @@ namespace subprocess {
106108// from pipe
107109static const size_t SP_MAX_ERR_BUF_SIZ = 1024 ;
108110
109- // Default buffer capcity for OutBuffer and ErrBuffer.
111+ // Default buffer capacity for OutBuffer and ErrBuffer.
110112// If the data exceeds this capacity, the buffer size is grown
111113// by 1.5 times its previous capacity
112114static const size_t DEFAULT_BUF_CAP_BYTES = 8192 ;
@@ -312,8 +314,8 @@ namespace util
312314 inline env_map_t MapFromWindowsEnvironment (){
313315 wchar_t *variable_strings_ptr;
314316 wchar_t *environment_strings_ptr;
315- std::wstring delimeter (L" =" );
316- int del_len = delimeter .length ();
317+ std::wstring delimiter (L" =" );
318+ int del_len = delimiter .length ();
317319 env_map_t mapped_environment;
318320
319321 // Get a pointer to the environment block.
@@ -335,7 +337,7 @@ namespace util
335337 // Create a string from Variable String
336338 env_string_t current_line (variable_strings_ptr);
337339 // Find the first "equals" sign.
338- auto pos = current_line.find (delimeter );
340+ auto pos = current_line.find (delimiter );
339341 // Assuming it's not missing ...
340342 if (pos!=std::wstring::npos){
341343 // ... parse the key and value.
@@ -433,8 +435,8 @@ namespace util
433435 * Function: join
434436 * Parameters:
435437 * [in] vec : Vector of strings which needs to be joined to form
436- * a single string with words seperated by a seperator char.
437- * [in] sep : String used to seperate 2 words in the joined string.
438+ * a single string with words separated by a separator char.
439+ * [in] sep : String used to separate 2 words in the joined string.
438440 * Default constructed to ' ' (space).
439441 * [out] string: Joined string.
440442 */
@@ -655,7 +657,7 @@ namespace util
655657 * Default value is 0.
656658 */
657659struct bufsize {
658- explicit bufsize (int siz ): bufsiz(siz ) {}
660+ explicit bufsize (int sz ): bufsiz(sz ) {}
659661 int bufsiz = 0 ;
660662};
661663
@@ -711,7 +713,7 @@ struct string_arg
711713};
712714
713715/* !
714- * Option to specify the executable name seperately
716+ * Option to specify the executable name separately
715717 * from the args sequence.
716718 * In this case the cmd args must only contain the
717719 * options required for this executable.
@@ -728,7 +730,7 @@ struct executable: string_arg
728730 * Option to set the current working directory
729731 * of the spawned process.
730732 *
731- * Eg: cwd{"/som /path/x"}
733+ * Eg: cwd{"/some /path/x"}
732734 */
733735struct cwd : string_arg
734736{
@@ -852,7 +854,7 @@ struct error
852854 wr_ch_ = fd;
853855 }
854856 explicit error (IOTYPE typ) {
855- assert ((typ == PIPE || typ == STDOUT) && " STDERR not aloowed " );
857+ assert ((typ == PIPE || typ == STDOUT) && " STDERR not allowed " );
856858 if (typ == PIPE) {
857859#ifndef __USING_WINDOWS__
858860 std::tie (rd_ch_, wr_ch_) = util::pipe_cloexec ();
@@ -874,7 +876,7 @@ struct error
874876// ATTN: Can be used only to execute functions with no
875877// arguments and returning void.
876878// Could have used more efficient methods, ofcourse, but
877- // that wont yield me the consistent syntax which I am
879+ // that won't yield me the consistent syntax which I am
878880// aiming for. If you know, then please do let me know.
879881
880882class preexec_func
@@ -1211,10 +1213,10 @@ class Streams
12111213 * 9. communicate(...) - Get the output/error from the child and close the channels
12121214 * from the parent side.
12131215 *10. input() - Get the input channel/File pointer. Can be used for
1214- * cutomizing the way of sending input to child.
1216+ * customizing the way of sending input to child.
12151217 *11. output() - Get the output channel/File pointer. Usually used
12161218 in case of redirection. See piping examples.
1217- *12. error() - Get the error channel/File poiner . Usually used
1219+ *12. error() - Get the error channel/File pointer . Usually used
12181220 in case of redirection.
12191221 *13. start_process() - Start the child process. Only to be used when
12201222 * `defer_spawn` option was provided in Popen constructor.
@@ -1358,7 +1360,7 @@ class Popen
13581360
13591361 // Command in string format
13601362 std::string args_;
1361- // Comamnd provided as sequence
1363+ // Command provided as sequence
13621364 std::vector<std::string> vargs_;
13631365 std::vector<char *> cargv_;
13641366
0 commit comments