194 changed files with 4025 additions and 4023 deletions
-
23d-viewer/3d_canvas.cpp
-
13CMakeLists.txt
-
2CMakeModules/download_boost.cmake
-
90TODO.txt
-
4common/CMakeLists.txt
-
1common/base_screen.cpp
-
5common/base_struct.cpp
-
39common/basicframe.cpp
-
14common/confirm.cpp
-
1599common/dcsvg.cpp.unused
-
16common/dialog_shim.cpp
-
4common/dialogs/dialog_get_component_base.cpp
-
4common/dialogs/dialog_get_component_base.fbp
-
6common/dialogs/dialog_get_component_base.h
-
11common/dialogs/dialog_list_selector_base.cpp
-
16common/dialogs/dialog_list_selector_base.fbp
-
16common/dialogs/dialog_list_selector_base.h
-
118common/displlst.cpp
-
22common/drawpanel.cpp
-
82common/eda_text.cpp
-
10common/edaappl.cpp
-
134common/fp_lib_table.cpp
-
5common/gal/opengl/gpu_manager.cpp
-
4common/gal/opengl/opengl_gal.cpp
-
4common/grid_tricks.cpp
-
2common/math/math_util.cpp
-
147common/profile.h
-
3common/selcolor.cpp
-
63common/string.cpp
-
4common/system/fcontext.s
-
76common/system/jump_arm_aapcs_elf_gas.S
-
79common/system/make_arm_aapcs_elf_gas.S
-
5common/tool/tool_manager.cpp
-
48common/validators.cpp
-
4common/view/view.cpp
-
2eeschema/dialogs/dialog_color_config.h
-
10eeschema/dialogs/dialog_edit_component_in_schematic.cpp
-
8eeschema/dialogs/dialog_edit_label.cpp
-
6eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.cpp
-
26eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.fbp
-
4eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.h
-
4eeschema/dialogs/dialog_lib_edit_text_base.cpp
-
4eeschema/dialogs/dialog_lib_edit_text_base.fbp
-
2eeschema/dialogs/dialog_lib_edit_text_base.h
-
4eeschema/dialogs/dialog_lib_new_component.fbp
-
4eeschema/dialogs/dialog_lib_new_component_base.cpp
-
8eeschema/edit_label.cpp
-
3eeschema/hierarch.cpp
-
2eeschema/lib_arc.cpp
-
2eeschema/lib_arc.h
-
2eeschema/lib_bezier.cpp
-
2eeschema/lib_bezier.h
-
4eeschema/lib_circle.cpp
-
2eeschema/lib_circle.h
-
2eeschema/lib_draw_item.h
-
2eeschema/lib_field.cpp
-
2eeschema/lib_field.h
-
2eeschema/lib_pin.cpp
-
2eeschema/lib_pin.h
-
2eeschema/lib_polyline.cpp
-
2eeschema/lib_polyline.h
-
2eeschema/lib_rectangle.cpp
-
2eeschema/lib_rectangle.h
-
2eeschema/lib_text.cpp
-
2eeschema/lib_text.h
-
1eeschema/operations_on_items_lists.cpp
-
2eeschema/sch_bitmap.cpp
-
2eeschema/sch_bitmap.h
-
6eeschema/sch_bus_entry.cpp
-
2eeschema/sch_bus_entry.h
-
4eeschema/sch_component.cpp
-
2eeschema/sch_component.h
-
2eeschema/sch_field.cpp
-
2eeschema/sch_field.h
-
2eeschema/sch_junction.cpp
-
2eeschema/sch_junction.h
-
2eeschema/sch_line.cpp
-
2eeschema/sch_line.h
-
2eeschema/sch_marker.cpp
-
2eeschema/sch_marker.h
-
2eeschema/sch_no_connect.cpp
-
2eeschema/sch_no_connect.h
-
2eeschema/sch_sheet.cpp
-
2eeschema/sch_sheet.h
-
23eeschema/sch_text.cpp
-
8eeschema/sch_text.h
-
4eeschema/sheetlab.cpp
-
2gerbview/class_gerber_draw_item.cpp
-
2gerbview/class_gerber_draw_item.h
-
2gerbview/dialogs/dialog_select_one_pcb_layer.cpp
-
9include/base_struct.h
-
17include/class_board_item.h
-
3include/dialog_helpers.h
-
7include/dialog_shim.h
-
11include/eda_text.h
-
26include/fctsys.h
-
101include/fp_lib_table.h
-
51include/kicad_string.h
-
21include/macros.h
-
88include/profile.h
1599
common/dcsvg.cpp.unused
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1,147 +0,0 @@ |
|||
/* |
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2013 CERN |
|||
* @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch> |
|||
* |
|||
* This program is free software; you can redistribute it and/or |
|||
* modify it under the terms of the GNU General Public License |
|||
* as published by the Free Software Foundation; either version 2 |
|||
* of the License, or (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program; if not, you may find one here: |
|||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html |
|||
* or you may search the http://www.gnu.org website for the version 2 license, |
|||
* or you may write to the Free Software Foundation, Inc., |
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA |
|||
*/ |
|||
|
|||
/** |
|||
* @file profile.h: |
|||
* @brief Simple profiling functions for measuring code execution time. |
|||
*/ |
|||
|
|||
#ifndef __TPROFILE_H |
|||
#define __TPROFILE_H |
|||
|
|||
#include <sys/time.h> |
|||
#include <stdint.h> |
|||
|
|||
/** |
|||
* Function rdtsc |
|||
* Returns processor's time-stamp counter. Main purpose is precise time measuring of code |
|||
* execution time. |
|||
* @return unsigned long long - Value of time-stamp counter. |
|||
*/ |
|||
#if defined(__i386__) |
|||
static __inline__ unsigned long long rdtsc() |
|||
{ |
|||
unsigned long long int x; |
|||
__asm__ volatile ( ".byte 0x0f, 0x31" : "=A" ( x ) ); |
|||
|
|||
return x; |
|||
} |
|||
|
|||
|
|||
#elif defined(__x86_64__) |
|||
static __inline__ unsigned long long rdtsc() |
|||
{ |
|||
unsigned hi, lo; |
|||
__asm__ __volatile__ ( "rdtsc" : "=a" ( lo ), "=d" ( hi ) ); |
|||
|
|||
return ( (unsigned long long) lo ) | ( ( (unsigned long long) hi ) << 32 ); |
|||
} |
|||
|
|||
|
|||
#elif defined(__powerpc__) |
|||
static __inline__ unsigned long long rdtsc() |
|||
{ |
|||
unsigned long long int result = 0; |
|||
unsigned long int upper, lower, tmp; |
|||
__asm__ volatile ( |
|||
"0: \n" |
|||
"\tmftbu %0 \n" |
|||
"\tmftb %1 \n" |
|||
"\tmftbu %2 \n" |
|||
"\tcmpw %2,%0 \n" |
|||
"\tbne 0b \n" |
|||
: "=r" ( upper ), "=r" ( lower ), "=r" ( tmp ) |
|||
); |
|||
|
|||
result = upper; |
|||
result = result << 32; |
|||
result = result | lower; |
|||
|
|||
return result; |
|||
} |
|||
|
|||
|
|||
#endif /* __powerpc__ */ |
|||
|
|||
// Fixme: OS X version |
|||
/** |
|||
* Function get_tics |
|||
* Returns the number of microseconds that have elapsed since the system was started. |
|||
* @return uint64_t Number of microseconds. |
|||
*/ |
|||
static inline uint64_t get_tics() |
|||
{ |
|||
struct timeval tv; |
|||
gettimeofday( &tv, NULL ); |
|||
|
|||
return (uint64_t) tv.tv_sec * 1000000ULL + (uint64_t) tv.tv_usec; |
|||
} |
|||
|
|||
|
|||
/** |
|||
* Structure for storing data related to profiling counters. |
|||
*/ |
|||
struct prof_counter |
|||
{ |
|||
uint64_t value; /// Stored timer value |
|||
bool use_rdtsc; /// Method of time measuring (rdtsc or tics) |
|||
}; |
|||
|
|||
/** |
|||
* Function prof_start |
|||
* Begins code execution time counting for a given profiling counter. |
|||
* @param cnt is the counter which should be started. |
|||
* @param use_rdtsc tells if processor's time-stamp counter should be used for time counting. |
|||
* Otherwise is system tics method will be used. IMPORTANT: time-stamp counter should not |
|||
* be used on multicore machines executing threaded code. |
|||
*/ |
|||
static inline void prof_start( prof_counter* cnt, bool use_rdtsc ) |
|||
{ |
|||
cnt->use_rdtsc = use_rdtsc; |
|||
|
|||
if( use_rdtsc ) |
|||
{ |
|||
cnt->value = rdtsc(); |
|||
} |
|||
else |
|||
{ |
|||
cnt->value = get_tics(); |
|||
} |
|||
} |
|||
|
|||
|
|||
/** |
|||
* Function prof_stop |
|||
* Ends code execution time counting for a given profiling counter. |
|||
* @param cnt is the counter which should be stopped. |
|||
*/ |
|||
static inline void prof_end( prof_counter* cnt ) |
|||
{ |
|||
if( cnt->use_rdtsc ) |
|||
cnt->value = rdtsc() - cnt->value; |
|||
else |
|||
cnt->value = get_tics() - cnt->value; |
|||
} |
|||
|
|||
#endif |
@ -0,0 +1,76 @@ |
|||
/* |
|||
Copyright Oliver Kowalke 2009. |
|||
Distributed under the Boost Software License, Version 1.0. |
|||
(See accompanying file LICENSE_1_0.txt or copy at |
|||
http://www.boost.org/LICENSE_1_0.txt) |
|||
*/ |
|||
|
|||
/******************************************************************* |
|||
* * |
|||
* ------------------------------------------------------------- * |
|||
* | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | * |
|||
* ------------------------------------------------------------- * |
|||
* | 0x0 | 0x4 | 0x8 | 0xc | 0x10| 0x14| 0x18| 0x1c| 0x20| 0x24| * |
|||
* ------------------------------------------------------------- * |
|||
* | v1 | v2 | v3 | v4 | v5 | v6 | v7 | v8 | sp | lr | * |
|||
* ------------------------------------------------------------- * |
|||
* ------------------------------------------------------------- * |
|||
* | 10 | | * |
|||
* ------------------------------------------------------------- * |
|||
* | 0x28| | * |
|||
* ------------------------------------------------------------- * |
|||
* | pc | | * |
|||
* ------------------------------------------------------------- * |
|||
* ------------------------------------------------------------- * |
|||
* | 11 | 12 | | * |
|||
* ------------------------------------------------------------- * |
|||
* | 0x2c| 0x30| | * |
|||
* ------------------------------------------------------------- * |
|||
* | sp | size| | * |
|||
* ------------------------------------------------------------- * |
|||
* ------------------------------------------------------------- * |
|||
* | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | * |
|||
* ------------------------------------------------------------- * |
|||
* | 0x34| 0x38|0x3c| 0x40| 0x44| 0x48| 0x4c| 0x50| 0x54| 0x58 | * |
|||
* ------------------------------------------------------------- * |
|||
* | s16 | s17 | s18 | s19 | s20 | s21 | s22 | s23 | s24 | s25 | * |
|||
* ------------------------------------------------------------- * |
|||
* ------------------------------------------------------------- * |
|||
* | 23 | 24 | 25 | 26 | 27 | 28 | | * |
|||
* ------------------------------------------------------------- * |
|||
* | 0x5c| 0x60| 0x64| 0x68| 0x6c| 0x70| | * |
|||
* ------------------------------------------------------------- * |
|||
* | s26 | s27 | s28 | s29 | s30 | s31 | | * |
|||
* ------------------------------------------------------------- * |
|||
* * |
|||
* *****************************************************************/ |
|||
|
|||
.text |
|||
.globl jump_fcontext |
|||
.align 2 |
|||
.type jump_fcontext,%function |
|||
jump_fcontext: |
|||
stmia a1, {v1-v8,sp-lr} @ save V1-V8,SP-LR |
|||
str lr, [a1,#40] @ save LR as PC |
|||
|
|||
#if (defined(__VFP_FP__) && !defined(__SOFTFP__)) |
|||
cmp a4, #0 @ test if fpu env should be preserved |
|||
beq 1f |
|||
|
|||
mov a4, a1 |
|||
add a4, #52 |
|||
vstmia a4, {d8-d15} @ save S16-S31 |
|||
|
|||
mov a4, a2 |
|||
add a4, #52 |
|||
vldmia a4, {d8-d15} @ restore S16-S31 |
|||
1: |
|||
#endif |
|||
|
|||
mov a1, a3 @ use third arg as return value after jump |
|||
@ and as first arg in context function |
|||
ldmia a2, {v1-v8,sp-pc} @ restore v1-V8,SP-PC |
|||
.size jump_fcontext,.-jump_fcontext |
|||
|
|||
/* Mark that we don't need executable stack. */ |
|||
.section .note.GNU-stack,"",%progbits |
@ -0,0 +1,79 @@ |
|||
/* |
|||
Copyright Oliver Kowalke 2009. |
|||
Distributed under the Boost Software License, Version 1.0. |
|||
(See accompanying file LICENSE_1_0.txt or copy at |
|||
http://www.boost.org/LICENSE_1_0.txt) |
|||
*/ |
|||
|
|||
/******************************************************************* |
|||
* * |
|||
* ------------------------------------------------------------- * |
|||
* | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | * |
|||
* ------------------------------------------------------------- * |
|||
* | 0x0 | 0x4 | 0x8 | 0xc | 0x10| 0x14| 0x18| 0x1c| 0x20| 0x24| * |
|||
* ------------------------------------------------------------- * |
|||
* | v1 | v2 | v3 | v4 | v5 | v6 | v7 | v8 | sp | lr | * |
|||
* ------------------------------------------------------------- * |
|||
* ------------------------------------------------------------- * |
|||
* | 10 | | * |
|||
* ------------------------------------------------------------- * |
|||
* | 0x28| | * |
|||
* ------------------------------------------------------------- * |
|||
* | pc | | * |
|||
* ------------------------------------------------------------- * |
|||
* ------------------------------------------------------------- * |
|||
* | 11 | 12 | | * |
|||
* ------------------------------------------------------------- * |
|||
* | 0x2c| 0x30| | * |
|||
* ------------------------------------------------------------- * |
|||
* | sp | size| | * |
|||
* ------------------------------------------------------------- * |
|||
* ------------------------------------------------------------- * |
|||
* | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | * |
|||
* ------------------------------------------------------------- * |
|||
* | 0x34| 0x38|0x3c| 0x40| 0x44| 0x48| 0x4c| 0x50| 0x54| 0x58 | * |
|||
* ------------------------------------------------------------- * |
|||
* | s16 | s17 | s18 | s19 | s20 | s21 | s22 | s23 | s24 | s25 | * |
|||
* ------------------------------------------------------------- * |
|||
* ------------------------------------------------------------- * |
|||
* | 23 | 24 | 25 | 26 | 27 | 28 | | * |
|||
* ------------------------------------------------------------- * |
|||
* | 0x5c| 0x60| 0x64| 0x68| 0x6c| 0x70| | * |
|||
* ------------------------------------------------------------- * |
|||
* | s26 | s27 | s28 | s29 | s30 | s31 | | * |
|||
* ------------------------------------------------------------- * |
|||
* * |
|||
* *****************************************************************/ |
|||
|
|||
.text |
|||
.globl make_fcontext |
|||
.align 2 |
|||
.type make_fcontext,%function |
|||
make_fcontext: |
|||
mov a4, a1 @ save address of context stack (base) A4 |
|||
sub a1, a1, #116 @ reserve space for fcontext_t at top of context stack |
|||
|
|||
@ shift address in A1 to lower 16 byte boundary |
|||
@ == pointer to fcontext_t and address of context stack |
|||
bic a1, a1, #15 |
|||
|
|||
str a4, [a1,#44] @ save address of context stack (base) in fcontext_t |
|||
str a2, [a1,#48] @ save context stack size in fcontext_t |
|||
str a3, [a1,#40] @ save address of context function in fcontext_t |
|||
|
|||
str a1, [a1,#32] @ save address in A4 as stack pointer for context function |
|||
|
|||
adr a2, finish @ compute abs address of label finish |
|||
str a2, [a1,#36] @ save address of finish as return address for context function |
|||
@ entered after context function returns |
|||
|
|||
bx lr |
|||
|
|||
finish: |
|||
@ SP points to same addras SP on entry of context function |
|||
mov a1, #0 @ exit code is zero |
|||
bl _exit@PLT @ exit application |
|||
.size make_fcontext,.-make_fcontext |
|||
|
|||
/* Mark that we don't need executable stack. */ |
|||
.section .note.GNU-stack,"",%progbits |
@ -0,0 +1,48 @@ |
|||
/*
|
|||
* This program source code file is part of KiCad, a free EDA CAD application. |
|||
* |
|||
* Copyright (C) 2013 Wayne Stambaugh <stambaughw@verizon.net> |
|||
* Copyright (C) 2004-2013 KiCad Developers, see change_log.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 |
|||
* as published by the Free Software Foundation; either version 2 |
|||
* of the License, or (at your option) any later version. |
|||
* |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program; if not, you may find one here: |
|||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|||
* or you may search the http://www.gnu.org website for the version 2 license,
|
|||
* or you may write to the Free Software Foundation, Inc., |
|||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA |
|||
*/ |
|||
|
|||
/**
|
|||
* @file validators.cpp |
|||
* @brief Custom text control validator implementations. |
|||
*/ |
|||
|
|||
#include <kicad_string.h>
|
|||
#include <validators.h>
|
|||
|
|||
|
|||
FOOTPRINT_NAME_VALIDATOR::FOOTPRINT_NAME_VALIDATOR( wxString* aValue ) : |
|||
wxTextValidator( wxFILTER_EXCLUDE_CHAR_LIST, aValue ) |
|||
{ |
|||
// The Windows (DOS) file system forbidden characters already include the forbidden
|
|||
// file name characters for both Posix and OSX systems. The characters \/*?|"<> are
|
|||
// illegal and filtered by the validator.
|
|||
wxString illegalChars = GetIllegalFileNameWxChars(); |
|||
wxTextValidator nameValidator( wxFILTER_EXCLUDE_CHAR_LIST ); |
|||
wxArrayString illegalCharList; |
|||
|
|||
for( unsigned i = 0; i < illegalChars.size(); i++ ) |
|||
illegalCharList.Add( wxString( illegalChars[i] ) ); |
|||
|
|||
SetExcludes( illegalCharList ); |
|||
} |
Some files were not shown because too many files changed in this diff
Write
Preview
Loading…
Cancel
Save
Reference in new issue