Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
e0f4963b
Commit
e0f4963b
authored
Jan 28, 2011
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OUTPUTFORMATTER::Quoted() was not wrapping strings containing internal quotes with quotes
parent
021becb4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
richio.cpp
common/richio.cpp
+1
-1
template_fieldnames.cpp
eeschema/template_fieldnames.cpp
+5
-4
No files found.
common/richio.cpp
View file @
e0f4963b
...
@@ -311,7 +311,7 @@ std::string OUTPUTFORMATTER::Quoted( const std::string& aWrapee ) throw( IO_ERRO
...
@@ -311,7 +311,7 @@ std::string OUTPUTFORMATTER::Quoted( const std::string& aWrapee ) throw( IO_ERRO
}
}
}
}
if
(
*
squote
)
if
(
*
squote
||
strchr
(
wrapee
.
c_str
(),
quote
)
)
{
{
// wrap the beginning and end of the string in a quote.
// wrap the beginning and end of the string in a quote.
wrapee
.
insert
(
wrapee
.
begin
(),
quote
);
wrapee
.
insert
(
wrapee
.
begin
(),
quote
);
...
...
eeschema/template_fieldnames.cpp
View file @
e0f4963b
...
@@ -17,7 +17,7 @@ wxString TEMPLATE_FIELDNAME::GetDefaultFieldName( int aFieldNdx )
...
@@ -17,7 +17,7 @@ wxString TEMPLATE_FIELDNAME::GetDefaultFieldName( int aFieldNdx )
_
(
"Datasheet"
),
// Link to a datasheet for component
_
(
"Datasheet"
),
// Link to a datasheet for component
};
};
if
(
(
unsigned
)
aFieldNdx
<
DIM
(
fixedNames
)
)
if
(
(
unsigned
)
aFieldNdx
<
DIM
(
fixedNames
)
)
return
fixedNames
[
aFieldNdx
];
return
fixedNames
[
aFieldNdx
];
else
else
...
@@ -32,11 +32,12 @@ wxString TEMPLATE_FIELDNAME::GetDefaultFieldName( int aFieldNdx )
...
@@ -32,11 +32,12 @@ wxString TEMPLATE_FIELDNAME::GetDefaultFieldName( int aFieldNdx )
void
TEMPLATE_FIELDNAME
::
Format
(
OUTPUTFORMATTER
*
out
,
int
nestLevel
)
const
throw
(
IO_ERROR
)
void
TEMPLATE_FIELDNAME
::
Format
(
OUTPUTFORMATTER
*
out
,
int
nestLevel
)
const
throw
(
IO_ERROR
)
{
{
// user may want spaces in his field name, ug, so quote them for the parser.
out
->
Print
(
nestLevel
,
"(field (name %s)"
,
out
->
Print
(
nestLevel
,
"(field (name
\"
%s
\"
)"
,
CONV_TO_UTF8
(
m_Name
)
);
out
->
Quoted
(
CONV_TO_UTF8
(
m_Name
)
).
c_str
(
)
);
if
(
!
m_Value
.
IsEmpty
()
)
if
(
!
m_Value
.
IsEmpty
()
)
out
->
Print
(
0
,
"(value
\"
%s
\"
)"
,
CONV_TO_UTF8
(
m_Value
)
);
out
->
Print
(
0
,
"(value %s)"
,
out
->
Quoted
(
CONV_TO_UTF8
(
m_Value
)
).
c_str
()
);
if
(
m_Visible
)
if
(
m_Visible
)
out
->
Print
(
0
,
" visible"
);
out
->
Print
(
0
,
" visible"
);
...
...
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