[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: MSVC compiler support [patch 33]: Help
From: |
John W. Eaton |
Subject: |
RE: MSVC compiler support [patch 33]: Help |
Date: |
Thu, 26 Oct 2006 11:46:23 -0400 |
On 26-Oct-2006, address@hidden wrote:
| > I won't apply this patch unless I know why it is needed, and even
| > then, I think we should find some solution other than disabling help
|
| Basically, the problem was I had was a crash due to the setvbuf problem.
| At that moment, I didn't setvbuf was crashing, so I disabled the code.
| If sed and makeinfo are available the code works OK, except that the
| sed for Windows (GnuWin32 package) uses double-quotes and not
| single-quote; hence the following patch:
|
| Index: src/help.cc
| ===================================================================
| RCS file: /cvs/octave/src/help.cc,v
| retrieving revision 1.165
| diff -c -p -r1.165 help.cc
| *** src/help.cc 16 Aug 2006 06:52:19 -0000 1.165
| --- src/help.cc 26 Oct 2006 14:20:57 -0000
| *************** display_help_text (std::ostream& os, con
| *** 779,785 ****
| --- 779,789 ----
|
| std::ostringstream buf;
|
| + #ifndef _MSC_VER
| buf << \"sed -e 's/^[#%][#%]* *//' -e 's/^ *@/@/' | \"
| + #else
| + buf << \"sed -e \\\"s/^[#%][#%]* *//\\\" -e \\\"s/^ *@/@/\\\" | \"
| + #endif
| << \"\\\"\" << Vmakeinfo_program << \"\\\"\"
| << \" -D \\\"VERSION \" << OCTAVE_VERSION << \"\\\"\"
| << \" -D \\\"OCTAVEHOME \" << OCTAVE_PREFIX << \"\\\"\"
Are you sure it is not the command shell that is interpreting these?
In any case, " will work for Unix too, so I made this change
unconditionally. But this just points out (again) how shell commands
will always be a source of bugs if we can't assume a POSIX shell
exists to run commands for us.
jwe