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
64077517
Commit
64077517
authored
Mar 22, 2011
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revised bug fix
parent
ba6100e3
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
13 deletions
+11
-13
string.cpp
common/string.cpp
+2
-2
sch_sheet_pin.cpp
eeschema/sch_sheet_pin.cpp
+3
-5
sch_sweet_parser.cpp
new/sch_sweet_parser.cpp
+4
-4
class_pcb_text.cpp
pcbnew/class_pcb_text.cpp
+2
-2
No files found.
common/string.cpp
View file @
64077517
...
@@ -58,7 +58,7 @@ std::string EscapedUTF8( const wxString& aString )
...
@@ -58,7 +58,7 @@ std::string EscapedUTF8( const wxString& aString )
std
::
string
ret
;
std
::
string
ret
;
//
ret += '"';
ret
+=
'"'
;
for
(
std
::
string
::
const_iterator
it
=
utf8
.
begin
();
it
!=
utf8
.
end
();
++
it
)
for
(
std
::
string
::
const_iterator
it
=
utf8
.
begin
();
it
!=
utf8
.
end
();
++
it
)
{
{
...
@@ -77,7 +77,7 @@ std::string EscapedUTF8( const wxString& aString )
...
@@ -77,7 +77,7 @@ std::string EscapedUTF8( const wxString& aString )
ret
+=
*
it
;
ret
+=
*
it
;
}
}
//
ret += '"';
ret
+=
'"'
;
return
ret
;
return
ret
;
}
}
...
...
eeschema/sch_sheet_pin.cpp
View file @
64077517
...
@@ -241,8 +241,9 @@ bool SCH_SHEET_PIN::Save( FILE* aFile ) const
...
@@ -241,8 +241,9 @@ bool SCH_SHEET_PIN::Save( FILE* aFile ) const
type
=
'U'
;
break
;
type
=
'U'
;
break
;
}
}
if
(
fprintf
(
aFile
,
"F%d
\"
%s
\"
%c %c %-3d %-3d %-3d
\n
"
,
m_Number
,
if
(
fprintf
(
aFile
,
"F%d %s %c %c %-3d %-3d %-3d
\n
"
,
m_Number
,
TO_UTF8
(
m_Text
),
type
,
side
,
m_Pos
.
x
,
m_Pos
.
y
,
EscapedUTF8
(
m_Text
).
c_str
(),
// supplies wrapping quotes
type
,
side
,
m_Pos
.
x
,
m_Pos
.
y
,
m_Size
.
x
)
==
EOF
)
m_Size
.
x
)
==
EOF
)
{
{
return
false
;
return
false
;
...
@@ -298,9 +299,6 @@ bool SCH_SHEET_PIN::Load( LINE_READER& aLine, wxString& aErrorMsg )
...
@@ -298,9 +299,6 @@ bool SCH_SHEET_PIN::Load( LINE_READER& aLine, wxString& aErrorMsg )
m_Text
=
FROM_UTF8
(
name
);
m_Text
=
FROM_UTF8
(
name
);
m_Text
=
m_Text
.
AfterFirst
(
wxChar
(
'"'
)
);
m_Text
=
m_Text
.
BeforeLast
(
wxChar
(
'"'
)
);
if
(
size
==
0
)
if
(
size
==
0
)
size
=
DEFAULT_SIZE_TEXT
;
size
=
DEFAULT_SIZE_TEXT
;
...
...
new/sch_sweet_parser.cpp
View file @
64077517
...
@@ -341,7 +341,7 @@ void SWEET_PARSER::parseFont( GR_FONT* me )
...
@@ -341,7 +341,7 @@ void SWEET_PARSER::parseFont( GR_FONT* me )
# that time FONT will have to be defined. Initially, only the font size and
# that time FONT will have to be defined. Initially, only the font size and
# style are required. Italic and bold styles are optional. The font size
# style are required. Italic and bold styles are optional. The font size
# height and width are in units yet to be determined.
# height and width are in units yet to be determined.
(font [FONT] (size HEIGHT WIDTH) [
ITALIC] [BOLD
])
(font [FONT] (size HEIGHT WIDTH) [
italic] [bold
])
*/
*/
...
@@ -426,8 +426,8 @@ void SWEET_PARSER::parsePin( PIN* me )
...
@@ -426,8 +426,8 @@ void SWEET_PARSER::parsePin( PIN* me )
(pin TYPE SHAPE
(pin TYPE SHAPE
(at X Y [ANGLE])
(at X Y [ANGLE])
(length LENGTH)
(length LENGTH)
(name NAME (font [FONT] (size HEIGHT WIDTH) [
ITALIC] [BOLD
])(visible YES))
(name NAME (font [FONT] (size HEIGHT WIDTH) [
italic] [bold
])(visible YES))
(number NUMBER (font [FONT] (size HEIGHT WIDTH) [
ITALIC] [BOLD
] (visible YES))
(number NUMBER (font [FONT] (size HEIGHT WIDTH) [
italic] [bold
] (visible YES))
(visible YES)
(visible YES)
)
)
*/
*/
...
@@ -911,7 +911,7 @@ void SWEET_PARSER::parseText( GR_TEXT* me )
...
@@ -911,7 +911,7 @@ void SWEET_PARSER::parseText( GR_TEXT* me )
# Valid horizontal justification values are center, right, and left. Valid
# Valid horizontal justification values are center, right, and left. Valid
# vertical justification values are center, top, bottom.
# vertical justification values are center, top, bottom.
(justify HORIZONTAL_JUSTIFY VERTICAL_JUSTIFY)
(justify HORIZONTAL_JUSTIFY VERTICAL_JUSTIFY)
(font [FONT] (size HEIGHT WIDTH) [
ITALIC] [BOLD
])
(font [FONT] (size HEIGHT WIDTH) [
italic] [bold
])
(visible YES)
(visible YES)
(fill FILL_TYPE)
(fill FILL_TYPE)
)
)
...
...
pcbnew/class_pcb_text.cpp
View file @
64077517
...
@@ -163,9 +163,9 @@ bool TEXTE_PCB::Save( FILE* aFile ) const
...
@@ -163,9 +163,9 @@ bool TEXTE_PCB::Save( FILE* aFile ) const
wxString
txt
=
list
->
Item
(
ii
);
wxString
txt
=
list
->
Item
(
ii
);
if
(
ii
==
0
)
if
(
ii
==
0
)
fprintf
(
aFile
,
"Te
\"
%s
\"
\n
"
,
EscapedUTF8
(
txt
).
c_str
()
);
fprintf
(
aFile
,
"Te
%s
\n
"
,
EscapedUTF8
(
txt
).
c_str
()
);
else
else
fprintf
(
aFile
,
"nl
\"
%s
\"\n
"
,
TO_UTF8
(
txt
)
);
fprintf
(
aFile
,
"nl
%s
\n
"
,
EscapedUTF8
(
txt
).
c_str
(
)
);
}
}
delete
list
;
delete
list
;
...
...
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