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
69fd16ed
Commit
69fd16ed
authored
Apr 17, 2009
by
dickelbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
switch to GetChars() and away from wxString::GetData()
parent
0350744a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
25 deletions
+15
-25
specctra.cpp
pcbnew/specctra.cpp
+5
-15
specctra_export.cpp
pcbnew/specctra_export.cpp
+2
-2
specctra_import.cpp
pcbnew/specctra_import.cpp
+8
-8
No files found.
pcbnew/specctra.cpp
View file @
69fd16ed
...
...
@@ -321,9 +321,7 @@ void SPECCTRA_DB::LoadPCB( const wxString& filename ) throw( IOError )
if
(
!
fp
)
{
wxString
msg
;
msg
.
Printf
(
_
(
"Unable to open file
\"
%s
\"
"
),
filename
.
GetData
()
);
ThrowIOError
(
msg
);
ThrowIOError
(
_
(
"Unable to open file
\"
%s
\"
"
),
GetChars
(
filename
)
);
}
file
.
Attach
(
fp
);
// "exception safe" way to close the file.
...
...
@@ -353,9 +351,7 @@ void SPECCTRA_DB::LoadSESSION( const wxString& filename ) throw( IOError )
if
(
!
fp
)
{
wxString
msg
;
msg
.
Printf
(
_
(
"Unable to open file
\"
%s
\"
"
),
filename
.
GetData
()
);
ThrowIOError
(
msg
);
ThrowIOError
(
_
(
"Unable to open file
\"
%s
\"
"
),
GetChars
(
filename
)
);
}
file
.
Attach
(
fp
);
// "exception safe" way to close the file.
...
...
@@ -3470,9 +3466,7 @@ int SPECCTRA_DB::Print( int nestLevel, const char* fmt, ... ) throw( IOError )
if
(
result
<
0
||
(
result
=
vfprintf
(
fp
,
fmt
,
args
))
<
0
)
{
wxString
msg
;
msg
.
Printf
(
_
(
"System file error writing to file
\"
%s
\"
"
),
filename
.
GetData
()
);
ThrowIOError
(
msg
);
ThrowIOError
(
_
(
"System file error writing to file
\"
%s
\"
"
),
GetChars
(
filename
)
);
}
va_end
(
args
);
...
...
@@ -3529,9 +3523,7 @@ void SPECCTRA_DB::ExportPCB( wxString filename, bool aNameChange ) throw( IOErro
if
(
!
fp
)
{
wxString
msg
;
msg
.
Printf
(
_
(
"Unable to open file
\"
%s
\"
"
),
filename
.
GetData
()
);
ThrowIOError
(
msg
);
ThrowIOError
(
_
(
"Unable to open file
\"
%s
\"
"
),
GetChars
(
filename
)
);
}
if
(
pcb
)
...
...
@@ -3556,9 +3548,7 @@ void SPECCTRA_DB::ExportSESSION( wxString filename )
if
(
!
fp
)
{
wxString
msg
;
msg
.
Printf
(
_
(
"Unable to open file
\"
%s
\"
"
),
filename
.
GetData
()
);
ThrowIOError
(
msg
);
ThrowIOError
(
_
(
"Unable to open file
\"
%s
\"
"
),
GetChars
(
filename
)
);
}
if
(
session
)
...
...
pcbnew/specctra_export.cpp
View file @
69fd16ed
...
...
@@ -868,7 +868,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IOError )
if
(
module
->
GetReference
()
==
wxEmptyString
)
{
ThrowIOError
(
_
(
"Component with value of
\"
%s
\"
has empty reference id."
),
module
->
GetValue
().
GetData
(
)
);
GetChars
(
module
->
GetValue
()
)
);
}
// if we cannot insert OK, that means the reference has been seen before.
...
...
@@ -876,7 +876,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IOError )
if
(
!
refpair
.
second
)
// insert failed
{
ThrowIOError
(
_
(
"Multiple components have identical reference IDs of
\"
%s
\"
."
),
module
->
GetReference
().
GetData
(
)
);
GetChars
(
module
->
GetReference
()
)
);
}
}
}
...
...
pcbnew/specctra_import.cpp
View file @
69fd16ed
...
...
@@ -115,7 +115,7 @@ void WinEDA_PcbFrame::ImportSpecctraSession( wxCommandEvent& event )
GetScreen
()
->
SetModify
();
GetBoard
()
->
m_Status_Pcb
=
0
;
/* At this point we should call Compile_Ratsnest()
* but this could be time consumming.
* So if incorrect number of Connecred and No connected pads is accepted
...
...
@@ -201,7 +201,7 @@ TRACK* SPECCTRA_DB::makeTRACK( PATH* aPath, int aPointIndex, int aNetcode ) thro
{
wxString
layerName
=
CONV_FROM_UTF8
(
aPath
->
layer_id
.
c_str
()
);
ThrowIOError
(
_
(
"Session file uses invalid layer id
\"
%s
\"
"
),
layerName
.
GetData
(
)
);
GetChars
(
layerName
)
);
}
TRACK
*
track
=
new
TRACK
(
sessionBoard
);
...
...
@@ -258,7 +258,7 @@ SEGVIA* SPECCTRA_DB::makeVIA( PADSTACK* aPadstack, const POINT& aPoint, int aNet
DSN_T
type
=
shape
->
shape
->
Type
();
if
(
type
!=
T_circle
)
ThrowIOError
(
_
(
"Unsupported via shape:
\"
%s
\"
"
),
LEXER
::
GetTokenString
(
type
).
GetData
(
)
);
GetChars
(
LEXER
::
GetTokenString
(
type
)
)
);
CIRCLE
*
circle
=
(
CIRCLE
*
)
shape
->
shape
;
int
viaDiam
=
scale
(
circle
->
diameter
,
routeResolution
);
...
...
@@ -276,7 +276,7 @@ SEGVIA* SPECCTRA_DB::makeVIA( PADSTACK* aPadstack, const POINT& aPoint, int aNet
DSN_T
type
=
shape
->
shape
->
Type
();
if
(
type
!=
T_circle
)
ThrowIOError
(
_
(
"Unsupported via shape:
\"
%s
\"
"
),
LEXER
::
GetTokenString
(
type
).
GetData
(
)
);
GetChars
(
LEXER
::
GetTokenString
(
type
)
)
);
CIRCLE
*
circle
=
(
CIRCLE
*
)
shape
->
shape
;
int
viaDiam
=
scale
(
circle
->
diameter
,
routeResolution
);
...
...
@@ -300,7 +300,7 @@ SEGVIA* SPECCTRA_DB::makeVIA( PADSTACK* aPadstack, const POINT& aPoint, int aNet
DSN_T
type
=
shape
->
shape
->
Type
();
if
(
type
!=
T_circle
)
ThrowIOError
(
_
(
"Unsupported via shape:
\"
%s
\"
"
),
LEXER
::
GetTokenString
(
type
).
GetData
(
)
);
GetChars
(
LEXER
::
GetTokenString
(
type
)
)
);
CIRCLE
*
circle
=
(
CIRCLE
*
)
shape
->
shape
;
...
...
@@ -309,7 +309,7 @@ SEGVIA* SPECCTRA_DB::makeVIA( PADSTACK* aPadstack, const POINT& aPoint, int aNet
{
wxString
layerName
=
CONV_FROM_UTF8
(
circle
->
layer_id
.
c_str
()
);
ThrowIOError
(
_
(
"Session file uses invalid layer id
\"
%s
\"
"
),
layerName
.
GetData
(
)
);
GetChars
(
layerName
)
);
}
if
(
layerNdx
>
topLayerNdx
)
...
...
@@ -392,7 +392,7 @@ void SPECCTRA_DB::FromSESSION( BOARD* aBoard ) throw( IOError )
{
ThrowIOError
(
_
(
"Session file has 'reference' to non-existent component
\"
%s
\"
"
),
reference
.
GetData
(
)
);
GetChars
(
reference
)
);
}
if
(
!
place
->
hasVertex
)
...
...
@@ -536,7 +536,7 @@ void SPECCTRA_DB::FromSESSION( BOARD* aBoard ) throw( IOError )
wxString
psid
(
CONV_FROM_UTF8
(
wire_via
->
GetPadstackId
().
c_str
()
)
);
ThrowIOError
(
_
(
"A wire_via references a missing padstack
\"
%s
\"
"
),
psid
.
GetData
(
)
);
GetChars
(
psid
)
);
}
for
(
unsigned
v
=
0
;
v
<
wire_via
->
vertexes
.
size
();
++
v
)
...
...
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