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
64f8e0b8
Commit
64f8e0b8
authored
Jun 13, 2013
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
various
parent
a3f2980d
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
43 additions
and
39 deletions
+43
-39
cmake_uninstall.cmake.in
CMakeModules/cmake_uninstall.cmake.in
+21
-20
drawframe.cpp
common/drawframe.cpp
+7
-7
reporter.cpp
common/reporter.cpp
+1
-1
reporter.h
include/reporter.h
+8
-5
xnode.h
include/xnode.h
+1
-1
class_board_item.cpp
pcbnew/class_board_item.cpp
+5
-5
No files found.
CMakeModules/cmake_uninstall.cmake.in
View file @
64f8e0b8
IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt"
)
if( NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt"
)
MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\""
)
message( FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\""
)
ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt"
)
endif(
)
FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
file( READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files )
STRING(REGEX REPLACE "\n" ";" files "${files}")
string( REGEX REPLACE "\n" ";" files "${files}" )
FOREACH(file ${files})
MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
foreach( file ${files} )
IF(EXISTS "$ENV{DESTDIR}${file}")
message( STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"" )
if( EXISTS "$ENV{DESTDIR}${file}" )
EXEC_PROGRAM(
EXEC_PROGRAM(
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
OUTPUT_VARIABLE rm_out
OUTPUT_VARIABLE rm_out
RETURN_VALUE rm_retval
RETURN_VALUE rm_retval
)
)
IF(NOT "${rm_retval}" STREQUAL 0
)
if( NOT "${rm_retval}" STREQUAL 0
)
MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\""
)
message( FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\""
)
ENDIF(NOT "${rm_retval}" STREQUAL 0
)
endif(
)
ELSE(EXISTS "$ENV{DESTDIR}${file}"
)
else(
)
MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist."
)
message( STATUS "File \"$ENV{DESTDIR}${file}\" does not exist."
)
ENDIF(EXISTS "$ENV{DESTDIR}${file}"
)
endif(
)
ENDFOREACH(file
)
endforeach(
)
common/drawframe.cpp
View file @
64f8e0b8
common/reporter.cpp
View file @
64f8e0b8
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
#include <reporter.h>
#include <reporter.h>
REPORTER
&
REPORTER
::
Report
(
const
char
*
aText
)
REPORTER
&
REPORTER
::
Report
(
const
char
*
aText
)
{
{
Report
(
FROM_UTF8
(
aText
)
);
Report
(
FROM_UTF8
(
aText
)
);
return
*
this
;
return
*
this
;
...
...
include/reporter.h
View file @
64f8e0b8
...
@@ -39,11 +39,14 @@ class wxTextCtrl;
...
@@ -39,11 +39,14 @@ class wxTextCtrl;
/**
/**
* Class REPORTER
* Class REPORTER
* is a pure virtual class used to derive REPORT
O
R objects from.
* is a pure virtual class used to derive REPORT
E
R objects from.
*
*
* The purpose of the REPORTER object is to hide an object that take a string as an input
* The purpose of the REPORTER object is to offer a way for a procedural function
* from other objects. This prevents objects such as wxWidgets UI control internals from
* to report multiple errors without having to:
* being exposed to low level KiCad objects dervice from #BOARD_ITEM and #SCH_ITEM.
* <ul>
* <li> a) know too much about the caller's UI, i.e. wx. </li>
* <li> b) stop after the first error </li>
* </ul>
*/
*/
class
REPORTER
class
REPORTER
{
{
...
@@ -56,7 +59,7 @@ public:
...
@@ -56,7 +59,7 @@ public:
*/
*/
virtual
REPORTER
&
Report
(
const
wxString
&
aText
)
=
0
;
virtual
REPORTER
&
Report
(
const
wxString
&
aText
)
=
0
;
REPORTER
&
Report
(
const
char
*
aText
);
REPORTER
&
Report
(
const
char
*
aText
);
REPORTER
&
operator
<<
(
const
wxString
&
aText
)
{
return
Report
(
aText
);
}
REPORTER
&
operator
<<
(
const
wxString
&
aText
)
{
return
Report
(
aText
);
}
...
...
include/xnode.h
View file @
64f8e0b8
...
@@ -118,7 +118,7 @@ public:
...
@@ -118,7 +118,7 @@ public:
}
}
bool
DeleteAttribute
(
const
wxString
&
attrName
)
bool
DeleteAttribute
(
const
wxString
&
attrName
)
{
{
DeleteProperty
(
attrName
);
return
DeleteProperty
(
attrName
);
}
}
wxXmlProperty
*
GetAttributes
()
const
wxXmlProperty
*
GetAttributes
()
const
{
{
...
...
pcbnew/class_board_item.cpp
View file @
64f8e0b8
...
@@ -116,7 +116,7 @@ std::string BOARD_ITEM::FormatInternalUnits( int aValue )
...
@@ -116,7 +116,7 @@ std::string BOARD_ITEM::FormatInternalUnits( int aValue )
#else
#else
// Assume aValue is in nanometers, and that we want the result in millimeters,
// Assume aValue is in nanometers, and that we want the result in millimeters,
// and that int is 32 bit wide. Then perform an alternative algorithm.
// and that int is 32 bit
s
wide. Then perform an alternative algorithm.
// Can be used to verify that the above algorithm is correctly generating text.
// Can be used to verify that the above algorithm is correctly generating text.
// Convert aValue into an integer string, then insert a decimal point manually.
// Convert aValue into an integer string, then insert a decimal point manually.
// Results are the same as above general purpose algorithm.
// Results are the same as above general purpose algorithm.
...
@@ -128,13 +128,13 @@ std::string BOARD_ITEM::FormatInternalUnits( int aValue )
...
@@ -128,13 +128,13 @@ std::string BOARD_ITEM::FormatInternalUnits( int aValue )
else
else
{
{
char
buf
[
50
];
char
buf
[
50
];
int
len
=
sprintf
(
buf
,
aValue
>
0
?
"%06d"
:
"%07d"
,
aValue
);
int
len
=
sprintf
(
buf
,
aValue
>
0
?
"%06d"
:
"%07d"
,
aValue
);
// optionally pad w/leading zeros
std
::
string
ret
(
buf
,
len
);
std
::
string
ret
(
buf
,
len
);
std
::
string
::
iterator
it
=
ret
.
end
()
-
1
;
// last byte
std
::
string
::
iterator
it
=
ret
.
end
()
-
1
;
// last byte
// insert '.' at 6 positions from end, divid
es
by 10e6 (a million), nm => mm
// insert '.' at 6 positions from end, divid
ing
by 10e6 (a million), nm => mm
std
::
string
::
iterator
decpoint
=
ret
.
end
()
-
6
;
std
::
string
::
iterator
decpoint
=
ret
.
end
()
-
6
;
// truncate trailing zeros, up to decimal point position
// truncate trailing zeros, up to decimal point position
...
@@ -147,10 +147,10 @@ std::string BOARD_ITEM::FormatInternalUnits( int aValue )
...
@@ -147,10 +147,10 @@ std::string BOARD_ITEM::FormatInternalUnits( int aValue )
// decpoint is invalidated here, after insert()
// decpoint is invalidated here, after insert()
#if 1 // want
leading a
zero when decimal point is in first position?
#if 1 // want
a leading
zero when decimal point is in first position?
if
(
ret
[
0
]
==
'.'
)
if
(
ret
[
0
]
==
'.'
)
{
{
// insert leading zero ahead of decimal.
// insert leading zero ahead of decimal
point
.
ret
.
insert
(
ret
.
begin
(),
'0'
);
ret
.
insert
(
ret
.
begin
(),
'0'
);
}
}
else
if
(
ret
[
0
]
==
'-'
&&
ret
[
1
]
==
'.'
)
else
if
(
ret
[
0
]
==
'-'
&&
ret
[
1
]
==
'.'
)
...
...
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