[Brlcad-commits] CVS: brlcad/src/mged cmd.c,14.19,14.20 rtif.c,14.9,14.10
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: Sean M. <br...@us...> - 2005-10-30 21:59:07
|
Update of /cvsroot/brlcad/brlcad/src/mged In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30561/src/mged Modified Files: cmd.c rtif.c Log Message: remove C++-style // comments as there's no assumption of c99 compiler compliance yet, only c89 (mostly aix compiler though other old compilers too) Index: cmd.c =================================================================== RCS file: /cvsroot/brlcad/brlcad/src/mged/cmd.c,v retrieving revision 14.19 retrieving revision 14.20 diff -w -u -r14.19 -r14.20 --- cmd.c 29 Oct 2005 21:32:15 -0000 14.19 +++ cmd.c 30 Oct 2005 21:58:57 -0000 14.20 @@ -1577,7 +1577,7 @@ bu_vls_free(&vls); return TCL_ERROR; } -// XXXXXXXXXXXXXXX FIX LATER XXXXXXXXXXXXXXXXXx +/* XXXXXXXXXXXXXXX FIX LATER XXXXXXXXXXXXXXXXX */ #ifndef _WIN32 sync(); #endif Index: rtif.c =================================================================== RCS file: /cvsroot/brlcad/brlcad/src/mged/rtif.c,v retrieving revision 14.9 retrieving revision 14.10 diff -w -u -r14.9 -r14.10 --- rtif.c 23 Oct 2005 04:44:37 -0000 14.9 +++ rtif.c 30 Oct 2005 21:58:57 -0000 14.10 @@ -112,7 +112,6 @@ struct bu_list *vhead; double csize; }; -//Tcl_Channel chan; #ifdef TCL_OK Tcl_Channel chan1; #else @@ -654,41 +653,42 @@ sa.bInheritHandle = TRUE; sa.lpSecurityDescriptor = NULL; - // Save the handle to the current STDOUT. + /* Save the handle to the current STDOUT. */ hSaveStderr = GetStdHandle(STD_ERROR_HANDLE); - // Create a pipe for the child process's STDOUT. + /* Create a pipe for the child process's STDOUT. */ CreatePipe( &pipe_err[0], &pipe_err[1], &sa, 0); - // Set a write handle to the pipe to be STDOUT. + /* Set a write handle to the pipe to be STDOUT. */ SetStdHandle(STD_ERROR_HANDLE, pipe_err[1]); - // Create noninheritable read handle and close the inheritable read handle. + /* Create noninheritable read handle and close the inheritable read handle. */ DuplicateHandle( GetCurrentProcess(), pipe_err[0], GetCurrentProcess(), &pipe_errDup , 0, FALSE, DUPLICATE_SAME_ACCESS ); CloseHandle( pipe_err[0] ); - // The steps for redirecting child process's STDIN: - // 1. Save current STDIN, to be restored later. - // 2. Create anonymous pipe to be STDIN for child process. - // 3. Set STDIN of the parent to be the read handle to the - // pipe, so it is inherited by the child process. - // 4. Create a noninheritable duplicate of the write handle, - // and close the inheritable write handle. + /* The steps for redirecting child process's STDIN: + * 1. Save current STDIN, to be restored later. + * 2. Create anonymous pipe to be STDIN for child process. + * 3. Set STDIN of the parent to be the read handle to the + * pipe, so it is inherited by the child process. + * 4. Create a noninheritable duplicate of the write handle, + * and close the inheritable write handle. + */ - // Save the handle to the current STDIN. + /* Save the handle to the current STDIN. */ hSaveStdin = GetStdHandle(STD_INPUT_HANDLE); - // Create a pipe for the child process's STDIN. + /* Create a pipe for the child process's STDIN. */ CreatePipe(&pipe_in[0], &pipe_in[1], &sa, 0); - // Set a read handle to the pipe to be STDIN. + /* Set a read handle to the pipe to be STDIN. */ SetStdHandle(STD_INPUT_HANDLE, pipe_in[0]); - // Duplicate the write handle to the pipe so it is not inherited. + /* Duplicate the write handle to the pipe so it is not inherited. */ DuplicateHandle(GetCurrentProcess(), pipe_in[1], GetCurrentProcess(), &pipe_inDup, - 0, FALSE, // not inherited + 0, FALSE, /* not inherited */ DUPLICATE_SAME_ACCESS ); CloseHandle(pipe_in[1]); @@ -2075,57 +2075,58 @@ sa.bInheritHandle = TRUE; sa.lpSecurityDescriptor = NULL; - // Save the handle to the current STDOUT. + /* Save the handle to the current STDOUT. */ hSaveStdout = GetStdHandle(STD_OUTPUT_HANDLE); - // Create a pipe for the child process's STDOUT. + /* Create a pipe for the child process's STDOUT. */ CreatePipe( &pipe_out[0], &pipe_out[1], &sa, 0); - // Set a write handle to the pipe to be STDOUT. + /* Set a write handle to the pipe to be STDOUT. */ SetStdHandle(STD_OUTPUT_HANDLE, pipe_out[1]); - // Create noninheritable read handle and close the inheritable read handle. + /* Create noninheritable read handle and close the inheritable read handle. */ DuplicateHandle( GetCurrentProcess(), pipe_out[0], GetCurrentProcess(), &pipe_outDup , 0, FALSE, DUPLICATE_SAME_ACCESS ); CloseHandle( pipe_out[0] ); - // Save the handle to the current STDERR. + /* Save the handle to the current STDERR. */ hSaveStderr = GetStdHandle(STD_ERROR_HANDLE); - // Create a pipe for the child process's STDERR. + /* Create a pipe for the child process's STDERR. */ CreatePipe( &pipe_err[0], &pipe_err[1], &sa, 0); - // Set a write handle to the pipe to be STDERR. + /* Set a write handle to the pipe to be STDERR. */ SetStdHandle(STD_ERROR_HANDLE, pipe_err[1]); - // Create noninheritable read handle and close the inheritable read handle. + /* Create noninheritable read handle and close the inheritable read handle. */ DuplicateHandle( GetCurrentProcess(), pipe_err[0], GetCurrentProcess(), &pipe_errDup , 0, FALSE, DUPLICATE_SAME_ACCESS ); CloseHandle( pipe_err[0] ); - // The steps for redirecting child process's STDIN: - // 1. Save current STDIN, to be restored later. - // 2. Create anonymous pipe to be STDIN for child process. - // 3. Set STDIN of the parent to be the read handle to the - // pipe, so it is inherited by the child process. - // 4. Create a noninheritable duplicate of the write handle, - // and close the inheritable write handle. + /* The steps for redirecting child process's STDIN: + * 1. Save current STDIN, to be restored later. + * 2. Create anonymous pipe to be STDIN for child process. + * 3. Set STDIN of the parent to be the read handle to the + * pipe, so it is inherited by the child process. + * 4. Create a noninheritable duplicate of the write handle, + * and close the inheritable write handle. + */ - // Save the handle to the current STDIN. + /* Save the handle to the current STDIN. */ hSaveStdin = GetStdHandle(STD_INPUT_HANDLE); - // Create a pipe for the child process's STDIN. + /* Create a pipe for the child process's STDIN. */ CreatePipe(&pipe_in[0], &pipe_in[1], &sa, 0); - // Set a read handle to the pipe to be STDIN. + /* Set a read handle to the pipe to be STDIN. */ SetStdHandle(STD_INPUT_HANDLE, pipe_in[0]); - // Duplicate the write handle to the pipe so it is not inherited. + /* Duplicate the write handle to the pipe so it is not inherited. */ DuplicateHandle(GetCurrentProcess(), pipe_in[1], GetCurrentProcess(), &pipe_inDup, - 0, FALSE, // not inherited + 0, FALSE, /* not inherited */ DUPLICATE_SAME_ACCESS ); CloseHandle(pipe_in[1]); @@ -2161,16 +2162,16 @@ /* use fp_in to feed view info to nirt */ CloseHandle( pipe_in[0] ); fp_in = _fdopen( _open_osfhandle((HFILE)pipe_inDup,_O_TEXT), "w" ); - //fp_in = fdopen( pipe_in[1], "w" ); + /*fp_in = fdopen( pipe_in[1], "w" ); */ /* use fp_out to read back the result */ CloseHandle( pipe_out[1] ); - //fp_out = fdopen( pipe_out[0], "r" ); + /*fp_out = fdopen( pipe_out[0], "r" ); */ fp_out = _fdopen( _open_osfhandle((HFILE)pipe_outDup,_O_TEXT), "r" ); /* use fp_err to read any error messages */ CloseHandle(pipe_err[1]); - //fp_err = fdopen( pipe_err[0], "r" ); + /*fp_err = fdopen( pipe_err[0], "r" ); */ fp_err = _fdopen( _open_osfhandle((HFILE)pipe_errDup,_O_TEXT), "r" ); /* send quit command to nirt */ |