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
92577476
Commit
92577476
authored
May 25, 2012
by
Lorenzo Marcantonio
Committed by
Wayne Stambaugh
May 25, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rationalize numeric time stamps to type time_t.
parent
6e78a592
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
26 additions
and
24 deletions
+26
-24
common.cpp
common/common.cpp
+3
-3
class_library.h
eeschema/class_library.h
+1
-0
netlist.h
eeschema/netlist.h
+1
-1
sch_component.h
eeschema/sch_component.h
+1
-1
base_struct.h
include/base_struct.h
+3
-3
class_collector.h
include/class_collector.h
+3
-3
common.h
include/common.h
+1
-1
wxPcbStruct.h
include/wxPcbStruct.h
+1
-1
controle.cpp
pcbnew/controle.cpp
+1
-1
legacy_plugin.cpp
pcbnew/legacy_plugin.cpp
+8
-8
netlist_reader.h
pcbnew/netlist_reader.h
+1
-0
zones_by_polygon_fill_functions.cpp
pcbnew/zones_by_polygon_fill_functions.cpp
+2
-2
No files found.
common/common.cpp
View file @
92577476
...
...
@@ -325,10 +325,10 @@ bool ProcessExecute( const wxString& aCommandLine, int aFlags )
}
unsigned
long
GetNewTimeStamp
()
time_t
GetNewTimeStamp
()
{
static
unsigned
long
oldTimeStamp
;
unsigned
long
newTimeStamp
;
static
time_t
oldTimeStamp
;
time_t
newTimeStamp
;
newTimeStamp
=
time
(
NULL
);
...
...
eeschema/class_library.h
View file @
92577476
...
...
@@ -91,6 +91,7 @@ class CMP_LIBRARY
{
int
type
;
///< Library type indicator.
wxFileName
fileName
;
///< Library file name.
// ZZZ why this a wxDateTime where others are time_t?
wxDateTime
timeStamp
;
///< Library save time and date.
int
versionMajor
;
///< Library major version number.
int
versionMinor
;
///< Library minor version number.
...
...
eeschema/netlist.h
View file @
92577476
...
...
@@ -73,7 +73,7 @@ private:
SCH_SHEET_PATH
m_SheetPath
;
///< The sheet path for this reference.
bool
m_IsNew
;
///< True if not yet annotated.
int
m_SheetNum
;
///< The sheet number for the reference.
unsigned
long
m_TimeStamp
;
///< The time stamp for the reference.
time_t
m_TimeStamp
;
///< The time stamp for the reference.
wxString
*
m_Value
;
///< The component value of the refernce. It is the
///< same for all instances.
int
m_NumRef
;
///< The numeric part of the reference designator.
...
...
eeschema/sch_component.h
View file @
92577476
...
...
@@ -195,7 +195,7 @@ public:
* @see m_PathsAndReferences
* @param aNewTimeStamp = new time stamp
*/
void
SetTimeStamp
(
long
aNewTimeStamp
);
void
SetTimeStamp
(
time_t
aNewTimeStamp
);
EDA_RECT
GetBoundingBox
()
const
;
...
...
include/base_struct.h
View file @
92577476
...
...
@@ -400,7 +400,7 @@ protected:
EDA_ITEM
*
m_Parent
;
/* Linked list: Link (parent struct) */
EDA_ITEM
*
m_Son
;
/* Linked list: Link (son struct) */
unsigned
long
m_TimeStamp
;
///< Time stamp used for logical links
time_t
m_TimeStamp
;
///< Time stamp used for logical links
/// Set to true to override the visibility setting of the item.
bool
m_forceVisible
;
...
...
@@ -430,8 +430,8 @@ public:
*/
KICAD_T
Type
()
const
{
return
m_StructType
;
}
void
SetTimeStamp
(
unsigned
long
aNewTimeStamp
)
{
m_TimeStamp
=
aNewTimeStamp
;
}
unsigned
long
GetTimeStamp
()
const
{
return
m_TimeStamp
;
}
void
SetTimeStamp
(
time_t
aNewTimeStamp
)
{
m_TimeStamp
=
aNewTimeStamp
;
}
time_t
GetTimeStamp
()
const
{
return
m_TimeStamp
;
}
EDA_ITEM
*
Next
()
const
{
return
(
EDA_ITEM
*
)
Pnext
;
}
EDA_ITEM
*
Back
()
const
{
return
(
EDA_ITEM
*
)
Pback
;
}
...
...
include/class_collector.h
View file @
92577476
...
...
@@ -68,7 +68,7 @@ protected:
EDA_RECT
m_RefBox
;
/// The time at which the collection was made.
in
t
m_TimeAtCollection
;
time_
t
m_TimeAtCollection
;
public
:
...
...
@@ -205,7 +205,7 @@ public:
}
in
t
GetTime
()
time_
t
GetTime
()
{
return
m_TimeAtCollection
;
}
...
...
@@ -229,7 +229,7 @@ public:
bool
IsSimilarPointAndTime
(
const
wxPoint
&
aRefPos
)
{
const
int
distMax
=
2
;
// adjust these here
const
int
timeMax
=
3
;
// seconds, I think
const
time_t
timeMax
=
3
;
// seconds
int
dx
=
abs
(
aRefPos
.
x
-
m_RefPos
.
x
);
int
dy
=
abs
(
aRefPos
.
y
-
m_RefPos
.
y
);
...
...
include/common.h
View file @
92577476
...
...
@@ -572,7 +572,7 @@ void InitKiCadAbout( wxAboutDialogInfo& info );
/**
* @return an unique time stamp that changes after each call
*/
unsigned
long
GetNewTimeStamp
();
time_t
GetNewTimeStamp
();
int
DisplayColorFrame
(
wxWindow
*
parent
,
int
OldColor
);
int
GetCommandOptions
(
const
int
argc
,
const
char
**
argv
,
...
...
include/wxPcbStruct.h
View file @
92577476
...
...
@@ -1202,7 +1202,7 @@ public:
* @param aTimestamp = Timestamp for the zone to delete, used if aZone ==
* NULL
*/
void
Delete_OldZone_Fill
(
SEGZONE
*
aZone
,
long
aTimestamp
=
0
);
void
Delete_OldZone_Fill
(
SEGZONE
*
aZone
,
time_t
aTimestamp
=
0
);
/**
* Function Delete_LastCreatedCorner
...
...
pcbnew/controle.cpp
View file @
92577476
...
...
@@ -153,7 +153,7 @@ BOARD_ITEM* PCB_BASE_FRAME::PcbGeneralLocateAndDisplay( int aHotKeyCode )
/* Remove redundancies: sometime, zones are found twice,
* because zones can be filled by overlapping segments (this is a fill option)
*/
unsigned
long
timestampzone
=
0
;
time_t
timestampzone
=
0
;
for
(
int
ii
=
0
;
ii
<
m_Collector
->
GetCount
();
ii
++
)
{
...
...
pcbnew/legacy_plugin.cpp
View file @
92577476
...
...
@@ -930,7 +930,7 @@ MODULE* LEGACY_PLUGIN::LoadMODULE()
int
layer
=
intParse
(
data
,
&
data
);
long
edittime
=
hexParse
(
data
,
&
data
);
long
timestamp
=
hexParse
(
data
,
&
data
);
time_t
timestamp
=
hexParse
(
data
,
&
data
);
data
=
strtok
(
(
char
*
)
data
+
1
,
delims
);
...
...
@@ -957,7 +957,7 @@ MODULE* LEGACY_PLUGIN::LoadMODULE()
else
if
(
TESTLINE
(
"Sc"
)
)
// timestamp
{
long
timestamp
=
hexParse
(
line
+
SZ
(
"Sc"
)
);
time_t
timestamp
=
hexParse
(
line
+
SZ
(
"Sc"
)
);
module
->
SetTimeStamp
(
timestamp
);
}
...
...
@@ -1676,7 +1676,7 @@ void LEGACY_PLUGIN::loadPCB_LINE()
dseg
->
SetAngle
(
angle
);
// m_Angle
break
;
case
3
:
long
timestamp
;
time_t
timestamp
;
timestamp
=
hexParse
(
data
);
dseg
->
SetTimeStamp
(
timestamp
);
break
;
...
...
@@ -1841,7 +1841,7 @@ void LEGACY_PLUGIN::loadPCB_TEXT()
int
layer
=
intParse
(
line
+
SZ
(
"De"
),
&
data
);
int
notMirrored
=
intParse
(
data
,
&
data
);
long
timestamp
=
hexParse
(
data
,
&
data
);
time_t
timestamp
=
hexParse
(
data
,
&
data
);
char
*
style
=
strtok
(
(
char
*
)
data
,
delims
);
char
*
hJustify
=
strtok
(
NULL
,
delims
);
...
...
@@ -1940,7 +1940,7 @@ void LEGACY_PLUGIN::loadTrackList( TRACK* aInsertBeforeMe, int aStructType )
#endif
int
makeType
;
long
timeStamp
;
time_t
timeStamp
;
int
layer
,
type
,
flags
,
net_code
;
// parse the 2nd line to determine the type of object
...
...
@@ -2132,7 +2132,7 @@ void LEGACY_PLUGIN::loadZONE_CONTAINER()
else
if
(
TESTLINE
(
"ZInfo"
)
)
// general info found
{
// e.g. 'ZInfo 479194B1 310 "COMMON"'
long
timestamp
=
hexParse
(
line
+
SZ
(
"ZInfo"
),
&
data
);
time_t
timestamp
=
hexParse
(
line
+
SZ
(
"ZInfo"
),
&
data
);
int
netcode
=
intParse
(
data
,
&
data
);
if
(
ReadDelimitedText
(
buf
,
data
,
sizeof
(
buf
)
)
>
(
int
)
sizeof
(
buf
)
)
...
...
@@ -2348,7 +2348,7 @@ void LEGACY_PLUGIN::loadDIMENSION()
else
if
(
TESTLINE
(
"Ge"
)
)
{
int
layer
;
long
timestamp
;
time_t
timestamp
;
int
shape
;
sscanf
(
line
+
SZ
(
"Ge"
),
" %d %d %lX"
,
&
shape
,
&
layer
,
&
timestamp
);
...
...
@@ -2542,7 +2542,7 @@ void LEGACY_PLUGIN::loadPCB_TARGET()
BIU
pos_y
=
biuParse
(
data
,
&
data
);
BIU
size
=
biuParse
(
data
,
&
data
);
BIU
width
=
biuParse
(
data
,
&
data
);
long
timestamp
=
hexParse
(
data
);
time_t
timestamp
=
hexParse
(
data
);
if
(
layer
<
FIRST_NO_COPPER_LAYER
)
layer
=
FIRST_NO_COPPER_LAYER
;
...
...
pcbnew/netlist_reader.h
View file @
92577476
...
...
@@ -78,6 +78,7 @@ public:
wxString
m_Footprint
;
// the footprint name found in netlist, the in .cmp file
wxString
m_Reference
;
// the schematic reference found in netlist
wxString
m_Value
;
// the schematic value found in netlist
// ZZZ This timestamp is string, not time_t
wxString
m_TimeStamp
;
// the schematic full time stamp found in netlist
wxString
m_Libpart
;
// the schematic libpart found in netlist
wxArrayString
m_FootprintFilter
;
// a footprint filters list found in old format netlist
...
...
pcbnew/zones_by_polygon_fill_functions.cpp
View file @
92577476
...
...
@@ -53,10 +53,10 @@
* @param aZone = zone segment within the zone to delete. Can be NULL
* @param aTimestamp = Timestamp for the zone to delete, used if aZone == NULL
*/
void
PCB_EDIT_FRAME
::
Delete_OldZone_Fill
(
SEGZONE
*
aZone
,
long
aTimestamp
)
void
PCB_EDIT_FRAME
::
Delete_OldZone_Fill
(
SEGZONE
*
aZone
,
time_t
aTimestamp
)
{
bool
modify
=
false
;
unsigned
long
TimeStamp
;
time_t
TimeStamp
;
if
(
aZone
==
NULL
)
TimeStamp
=
aTimestamp
;
...
...
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