From b36a8ec92af14f3b25962a4e0c0aa7818f336359 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Sun, 22 Jul 2018 09:43:45 -0400 Subject: [PATCH] * src/read.c(unescape_char): Use C comments not C++ comments. * src/posixos.c(set_blocking): Ditto. * src/w32/subproc/sub_proc.c(process_init): Ditto --- src/posixos.c | 2 +- src/read.c | 2 +- src/w32/subproc/sub_proc.c | 16 +++++++--------- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/posixos.c b/src/posixos.c index 0afc4987..a4aa6f77 100644 --- a/src/posixos.c +++ b/src/posixos.c @@ -65,7 +65,7 @@ make_job_rfd (void) static void set_blocking (int fd, int blocking) { - // If we're not using pselect() don't change the blocking + /* If we're not using pselect() don't change the blocking. */ #ifdef HAVE_PSELECT int flags; EINTRLOOP (flags, fcntl (fd, F_GETFL)); diff --git a/src/read.c b/src/read.c index 6801eebd..d23d5fd0 100644 --- a/src/read.c +++ b/src/read.c @@ -2382,7 +2382,7 @@ unescape_char (char *string, int c) memmove (p, s, l); p += l; - // If we hit the end of the string, we're done + /* If we hit the end of the string, we're done. */ if (*e == '\0') break; } diff --git a/src/w32/subproc/sub_proc.c b/src/w32/subproc/sub_proc.c index 9ff136f4..507d683e 100644 --- a/src/w32/subproc/sub_proc.c +++ b/src/w32/subproc/sub_proc.c @@ -412,9 +412,9 @@ process_init() inherit.lpSecurityDescriptor = (PSECURITY_DESCRIPTOR)(&sd); inherit.bInheritHandle = TRUE; - // By convention, parent gets pipe[0], and child gets pipe[1] - // This means the READ side of stdin pipe goes into pipe[1] - // and the WRITE side of the stdout and stderr pipes go into pipe[1] + /* By convention, parent gets pipe[0], and child gets pipe[1]. + This means the READ side of stdin pipe goes into pipe[1] and the + WRITE side of the stdout and stderr pipes go into pipe[1]. */ if (CreatePipe( &stdin_pipes[1], &stdin_pipes[0], &inherit, 0) == FALSE || CreatePipe( &stdout_pipes[0], &stdout_pipes[1], &inherit, 0) == FALSE || CreatePipe( &stderr_pipes[0], &stderr_pipes[1], &inherit, 0) == FALSE) { @@ -424,9 +424,7 @@ process_init() return((HANDLE)pproc); } - // - // Mark the parent sides of the pipes as non-inheritable - // + /* Mark the parent sides of the pipes as non-inheritable. */ if (SetHandleInformation(stdin_pipes[0], HANDLE_FLAG_INHERIT, 0) == FALSE || SetHandleInformation(stdout_pipes[0], @@ -832,8 +830,8 @@ proc_stdin_thread(sub_process *pproc) if (WriteFile( (HANDLE) pproc->sv_stdin[0], pproc->inp, pproc->incnt, &in_done, NULL) == FALSE) _endthreadex(0); - // This if should never be true for anonymous pipes, but gives - // us a chance to change I/O mechanisms later + /* This if should never be true for anonymous pipes, but gives + us a chance to change I/O mechanisms later. */ if (in_done < pproc->incnt) { pproc->incnt -= in_done; pproc->inp += in_done; @@ -841,7 +839,7 @@ proc_stdin_thread(sub_process *pproc) _endthreadex(0); } } - return 0; // for compiler warnings only.. not reached + return 0; /* for compiler warnings only.. not reached. */ } static DWORD