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
8876fdf4
Commit
8876fdf4
authored
Jan 18, 2015
by
unknown
Committed by
jean-pierre charras
Jan 18, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Misc minor fixes (Fix some minor compil warnings).
parent
ac539b95
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
60 additions
and
36 deletions
+60
-36
vrml_aux.cpp
3d-viewer/vrml_aux.cpp
+10
-6
vrml_aux.h
3d-viewer/vrml_aux.h
+0
-1
vrml_v1_modelparser.cpp
3d-viewer/vrml_v1_modelparser.cpp
+5
-5
vrml_v2_modelparser.cpp
3d-viewer/vrml_v2_modelparser.cpp
+10
-10
bitmap2component.cpp
bitmap2component/bitmap2component.cpp
+6
-0
lib_pin.cpp
eeschema/lib_pin.cpp
+27
-14
legacy_netlist_reader.cpp
pcbnew/legacy_netlist_reader.cpp
+1
-0
wx_python_helpers.cpp
scripting/wx_python_helpers.cpp
+1
-0
No files found.
3d-viewer/vrml_aux.cpp
View file @
8876fdf4
...
...
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2014 Mario Luzeiro <mrluzeiro@gmail.com>
* Copyright (C) 1992-201
4
KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-201
5
KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
...
...
@@ -28,9 +28,13 @@
#include "vrml_aux.h"
char
SkipGetChar
(
FILE
*
File
)
static
int
SkipGetChar
(
FILE
*
File
);
static
int
SkipGetChar
(
FILE
*
File
)
{
char
c
;
int
c
;
bool
re_parse
;
if
(
(
c
=
fgetc
(
File
)
)
==
EOF
)
...
...
@@ -92,7 +96,7 @@ char SkipGetChar( FILE* File )
char
*
GetNextTag
(
FILE
*
File
,
char
*
tag
)
{
char
c
=
SkipGetChar
(
File
);
int
c
=
SkipGetChar
(
File
);
if
(
c
==
EOF
)
{
...
...
@@ -136,7 +140,7 @@ char* GetNextTag( FILE* File, char* tag )
int
read_NotImplemented
(
FILE
*
File
,
char
closeChar
)
{
char
c
;
int
c
;
// DBG( printf( "look for %c\n", closeChar) );
while
(
(
c
=
fgetc
(
File
)
)
!=
EOF
)
...
...
@@ -189,7 +193,7 @@ int parseVertex( FILE* File, glm::vec3& dst_vertex )
dst_vertex
.
y
=
b
;
dst_vertex
.
z
=
c
;
char
s
=
SkipGetChar
(
File
);
int
s
=
SkipGetChar
(
File
);
if
(
s
!=
EOF
)
{
...
...
3d-viewer/vrml_aux.h
View file @
8876fdf4
...
...
@@ -49,7 +49,6 @@
#include <wx/glcanvas.h>
int
read_NotImplemented
(
FILE
*
File
,
char
closeChar
);
char
SkipGetChar
(
FILE
*
File
);
int
parseVertexList
(
FILE
*
File
,
std
::
vector
<
glm
::
vec3
>
&
dst_vector
);
int
parseVertex
(
FILE
*
File
,
glm
::
vec3
&
dst_vertex
);
int
parseFloat
(
FILE
*
File
,
float
*
dst_float
);
...
...
3d-viewer/vrml_v1_modelparser.cpp
View file @
8876fdf4
...
...
@@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2014 Mario Luzeiro <mrluzeiro@gmail.com>
* Copyright (C) 1992-201
4
KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 1992-201
5
KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
...
...
@@ -93,7 +93,7 @@ void VRML1_MODEL_PARSER::Load( const wxString& aFilename, double aVrmlunits_to_3
while
(
GetNextTag
(
m_file
,
text
)
)
{
if
(
(
text
==
NULL
)
||
(
*
text
==
'}'
)
||
(
*
text
==
']'
)
)
if
(
(
*
text
==
'}'
)
||
(
*
text
==
']'
)
)
{
continue
;
}
...
...
@@ -187,7 +187,7 @@ int VRML1_MODEL_PARSER::readMaterial()
while
(
GetNextTag
(
m_file
,
text
)
)
{
if
(
(
text
==
NULL
)
||
(
*
text
==
']'
)
)
if
(
*
text
==
']'
)
{
continue
;
}
...
...
@@ -235,7 +235,7 @@ int VRML1_MODEL_PARSER::readCoordinate3()
while
(
GetNextTag
(
m_file
,
text
)
)
{
if
(
(
text
==
NULL
)
||
(
*
text
==
']'
)
)
if
(
*
text
==
']'
)
{
continue
;
}
...
...
@@ -263,7 +263,7 @@ int VRML1_MODEL_PARSER::readIndexedFaceSet()
while
(
GetNextTag
(
m_file
,
text
)
)
{
if
(
(
text
==
NULL
)
||
(
*
text
==
']'
)
)
if
(
*
text
==
']'
)
{
continue
;
}
...
...
3d-viewer/vrml_v2_modelparser.cpp
View file @
8876fdf4
...
...
@@ -95,7 +95,7 @@ void VRML2_MODEL_PARSER::Load( const wxString& aFilename, double aVrmlunits_to_3
while
(
GetNextTag
(
m_file
,
text
)
)
{
if
(
(
text
==
NULL
)
||
(
*
text
==
'}'
)
||
(
*
text
==
']'
)
)
if
(
(
*
text
==
'}'
)
||
(
*
text
==
']'
)
)
{
continue
;
}
...
...
@@ -140,7 +140,7 @@ int VRML2_MODEL_PARSER::read_Transform()
while
(
GetNextTag
(
m_file
,
text
)
)
{
if
(
(
text
==
NULL
)
||
(
*
text
==
']'
)
)
if
(
*
text
==
']'
)
{
continue
;
}
...
...
@@ -259,7 +259,7 @@ int VRML2_MODEL_PARSER::read_DEF()
while
(
GetNextTag
(
m_file
,
text
)
)
{
if
(
(
text
==
NULL
)
||
(
*
text
==
']'
)
)
if
(
*
text
==
']'
)
{
// DBG( printf( " skiping %c\n", *text) );
continue
;
...
...
@@ -316,7 +316,7 @@ int VRML2_MODEL_PARSER::read_Shape()
while
(
GetNextTag
(
m_file
,
text
)
)
{
if
(
(
text
==
NULL
)
||
(
*
text
==
']'
)
)
if
(
*
text
==
']'
)
{
continue
;
}
...
...
@@ -363,7 +363,7 @@ int VRML2_MODEL_PARSER::read_Appearance()
while
(
GetNextTag
(
m_file
,
text
)
)
{
if
(
(
text
==
NULL
)
||
(
*
text
==
']'
)
)
if
(
*
text
==
']'
)
{
continue
;
}
...
...
@@ -468,7 +468,7 @@ int VRML2_MODEL_PARSER::read_Material()
while
(
GetNextTag
(
m_file
,
text
)
)
{
if
(
(
text
==
NULL
)
||
(
*
text
==
']'
)
)
if
(
*
text
==
']'
)
{
continue
;
}
...
...
@@ -561,7 +561,7 @@ int VRML2_MODEL_PARSER::read_IndexedFaceSet()
while
(
GetNextTag
(
m_file
,
text
)
)
{
if
(
(
text
==
NULL
)
||
(
*
text
==
']'
)
)
if
(
*
text
==
']'
)
{
continue
;
}
...
...
@@ -744,7 +744,7 @@ int VRML2_MODEL_PARSER::read_Color()
while
(
GetNextTag
(
m_file
,
text
)
)
{
if
(
(
text
==
NULL
)
||
(
*
text
==
']'
)
)
if
(
*
text
==
']'
)
{
continue
;
}
...
...
@@ -774,7 +774,7 @@ int VRML2_MODEL_PARSER::read_Normal()
while
(
GetNextTag
(
m_file
,
text
)
)
{
if
(
(
text
==
NULL
)
||
(
*
text
==
']'
)
)
if
(
*
text
==
']'
)
{
continue
;
}
...
...
@@ -812,7 +812,7 @@ int VRML2_MODEL_PARSER::read_Coordinate()
while
(
GetNextTag
(
m_file
,
text
)
)
{
if
(
(
text
==
NULL
)
||
(
*
text
==
']'
)
)
if
(
*
text
==
']'
)
{
continue
;
}
...
...
bitmap2component/bitmap2component.cpp
View file @
8876fdf4
...
...
@@ -158,6 +158,12 @@ int bitmap2component( potrace_bitmap_t* aPotrace_bitmap, FILE* aOutfile,
st
=
potrace_trace
(
param
,
aPotrace_bitmap
);
if
(
!
st
||
st
->
status
!=
POTRACE_STATUS_OK
)
{
if
(
st
)
{
potrace_state_free
(
st
);
}
potrace_param_free
(
param
);
fprintf
(
stderr
,
"Error tracing bitmap: %s
\n
"
,
strerror
(
errno
)
);
return
1
;
}
...
...
eeschema/lib_pin.cpp
View file @
8876fdf4
...
...
@@ -1919,38 +1919,44 @@ void LIB_PIN::SetWidth( int aWidth )
void
LIB_PIN
::
GetMsgPanelInfo
(
MSG_PANEL_ITEMS
&
aList
)
{
wxString
T
ext
;
wxString
t
ext
;
LIB_ITEM
::
GetMsgPanelInfo
(
aList
);
aList
.
push_back
(
MSG_PANEL_ITEM
(
_
(
"Name"
),
m_name
,
DARKCYAN
)
);
if
(
m_number
==
0
)
T
ext
=
wxT
(
"?"
);
t
ext
=
wxT
(
"?"
);
else
PinStringNum
(
T
ext
);
PinStringNum
(
t
ext
);
aList
.
push_back
(
MSG_PANEL_ITEM
(
_
(
"Number"
),
T
ext
,
DARKCYAN
)
);
aList
.
push_back
(
MSG_PANEL_ITEM
(
_
(
"Number"
),
t
ext
,
DARKCYAN
)
);
aList
.
push_back
(
MSG_PANEL_ITEM
(
_
(
"Type"
),
wxGetTranslation
(
pin_electrical_type_names
[
m_type
]
),
RED
)
);
Text
=
wxGetTranslation
(
pin_style_names
[
GetStyleCodeIndex
(
m_shape
)
]
);
aList
.
push_back
(
MSG_PANEL_ITEM
(
_
(
"Style"
),
Text
,
BLUE
)
);
int
styleCodeIndex
=
GetStyleCodeIndex
(
m_shape
);
if
(
styleCodeIndex
>=
0
)
text
=
wxGetTranslation
(
pin_style_names
[
styleCodeIndex
]
);
else
text
=
wxT
(
"?"
);
aList
.
push_back
(
MSG_PANEL_ITEM
(
_
(
"Style"
),
text
,
BLUE
)
);
if
(
IsVisible
()
)
T
ext
=
_
(
"Yes"
);
t
ext
=
_
(
"Yes"
);
else
T
ext
=
_
(
"No"
);
t
ext
=
_
(
"No"
);
aList
.
push_back
(
MSG_PANEL_ITEM
(
_
(
"Visible"
),
T
ext
,
DARKGREEN
)
);
aList
.
push_back
(
MSG_PANEL_ITEM
(
_
(
"Visible"
),
t
ext
,
DARKGREEN
)
);
// Display pin length
T
ext
=
StringFromValue
(
g_UserUnit
,
m_length
,
true
);
aList
.
push_back
(
MSG_PANEL_ITEM
(
_
(
"Length"
),
T
ext
,
MAGENTA
)
);
t
ext
=
StringFromValue
(
g_UserUnit
,
m_length
,
true
);
aList
.
push_back
(
MSG_PANEL_ITEM
(
_
(
"Length"
),
t
ext
,
MAGENTA
)
);
T
ext
=
wxGetTranslation
(
pin_orientation_names
[
GetOrientationCodeIndex
(
m_orientation
)
]
);
aList
.
push_back
(
MSG_PANEL_ITEM
(
_
(
"Orientation"
),
T
ext
,
DARKMAGENTA
)
);
t
ext
=
wxGetTranslation
(
pin_orientation_names
[
GetOrientationCodeIndex
(
m_orientation
)
]
);
aList
.
push_back
(
MSG_PANEL_ITEM
(
_
(
"Orientation"
),
t
ext
,
DARKMAGENTA
)
);
}
...
...
@@ -2201,11 +2207,18 @@ BITMAP_DEF LIB_PIN::GetMenuImage() const
wxString
LIB_PIN
::
GetSelectMenuText
()
const
{
wxString
tmp
;
wxString
style
;
int
styleCode
=
GetStyleCodeIndex
(
m_shape
);
if
(
styleCode
>=
0
)
style
=
wxGetTranslation
(
pin_style_names
[
styleCode
]
);
else
style
=
wxT
(
"?"
);
tmp
.
Printf
(
_
(
"Pin %s, %s, %s"
),
GetChars
(
GetNumberString
()
),
GetChars
(
GetTypeString
()
),
GetChars
(
wxGetTranslation
(
pin_style_names
[
GetStyleCodeIndex
(
m_shape
)
]
)
)
GetChars
(
style
)
);
return
tmp
;
}
...
...
pcbnew/legacy_netlist_reader.cpp
View file @
8876fdf4
...
...
@@ -185,6 +185,7 @@ void LEGACY_NETLIST_READER::loadNet( char* aText, COMPONENT* aComponent ) throw(
char
line
[
256
];
strncpy
(
line
,
aText
,
sizeof
(
line
)
);
line
[
sizeof
(
line
)
-
1
]
=
'\0'
;
if
(
(
p
=
strtok
(
line
,
" ()
\t\n
"
)
)
==
NULL
)
{
...
...
scripting/wx_python_helpers.cpp
View file @
8876fdf4
...
...
@@ -186,6 +186,7 @@ PyObject* wx2PyString( const wxString& src )
void
wxSetDefaultPyEncoding
(
const
char
*
encoding
)
{
strncpy
(
wxPythonEncoding
,
encoding
,
WX_DEFAULTENCODING_SIZE
);
wxPythonEncoding
[
WX_DEFAULTENCODING_SIZE
-
1
]
=
'\0'
;
}
...
...
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