Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
b634c17e
Commit
b634c17e
authored
Dec 04, 2009
by
Mark Olesen
Browse files
fixed off-by-one error in argList text wrap
parent
37c4f2f3
Changes
2
Hide whitespace changes
Inline
Side-by-side
applications/utilities/postProcessing/dataConversion/foamToEnsightParts/foamToEnsightParts.C
View file @
b634c17e
...
...
@@ -89,13 +89,13 @@ int main(int argc, char *argv[])
"index"
,
"start"
,
"ignore the time index contained in the uniform/time file "
"and use
a
simple indexing when creating the files"
"and use simple indexing when creating the files"
);
argList
::
addBoolOption
(
"noMesh"
,
"Suppress writing the geometry. "
"Can be useful for converting partial results for a static geometry
.
"
"Can be useful for converting partial results for a static geometry"
);
// the volume field types that we handle
...
...
src/OpenFOAM/global/argList/argList.C
View file @
b634c17e
...
...
@@ -166,17 +166,23 @@ void Foam::argList::printOptionUsage
string
::
size_type
curr
=
pos
+
textWidth
-
1
;
string
::
size_type
next
=
string
::
npos
;
if
(
isspace
(
str
[
curr
])
||
isspace
(
str
[
curr
+
1
])
)
if
(
isspace
(
str
[
curr
]))
{
// we were lucky: ended on a space or the next one is a space
next
=
str
.
find_first_not_of
(
"
\t\n
"
,
curr
+
1
);
// we were lucky: ended on a space
next
=
str
.
find_first_not_of
(
"
\t\n
"
,
curr
);
}
else
if
(
isspace
(
str
[
curr
+
1
]))
{
// the next one is a space - so we are okay
curr
++
;
// otherwise the length is wrong
next
=
str
.
find_first_not_of
(
"
\t\n
"
,
curr
);
}
else
{
// search for end of
the
previous word break
// search for end of
a
previous word break
string
::
size_type
prev
=
str
.
find_last_of
(
"
\t\n
"
,
curr
);
// reposition to the end of
the
previous word if possible
// reposition to the end of previous word if possible
if
(
prev
!=
string
::
npos
&&
prev
>
pos
)
{
curr
=
prev
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment