Commit Graph

67 Commits

Author SHA1 Message Date
Marek Roszko 627d321ec5 Remove questionable dropping of inline for msvc in markdown2html 2021-01-31 19:54:33 -05:00
Marek Roszko 9d0b16e814 bool/int type safety 2021-01-31 19:54:32 -05:00
Marek Roszko b17ba9d632 Tiny tiny cleanup 2021-01-31 19:09:28 -05:00
Seth Hillbrand 1a3ab551cf Cleanup
FindLineSegmentIntersection() was refactored in 2012 but there are a few
uses that didn't get updated.  This finalizes the cleanup

Fixes https://gitlab.com/kicad/code/kicad/issues/7365
2021-01-31 15:55:52 -08:00
Jiajie Chen ce8039c327 libcontext: Initial support for Apple Silicon
The assembly for apple_arm64 is adapted from linux_arm64 target with small modifications:

1. Re-enable FPU conditional save/restore as apple_x86_64 does
2. Workaround limitation in relocation in assembly for clang
2021-01-08 19:51:28 +00:00
Ian McInerney 580293c7fa libcontext: Call exit instead of random memory address on MSW x86_64
The original call would jump to a meaningless low address on error,
but the upstream Boost context and 32bit version of this function
call exit to properly terminate the code when this error occurs.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6820
2020-12-23 23:40:56 +00:00
Ian McInerney 31c5776fc0 Add missing header to rtree
Another GCC11 header change that broke the build
2020-12-09 23:13:33 +00:00
jean-pierre charras 20880268bf fix a few Coverity warnings 2020-11-26 07:36:37 +01:00
jean-pierre charras e5daac97c2 fix compil warrnings (shadowed vars) 2020-11-20 09:13:31 +01:00
Marek Roszko 6dfcc8a755 dxflib_qcad: add <cstring> to includes for strlen() prototype
upstream commit
d4ea687c4a6039a43cc782fbbce477720df11e78
2020-11-19 19:19:59 -05:00
Marek Roszko 86d4daa591 dxflib_qcad: add support for flipped dimension arrows to dxflib
upstream: 2f8c19e2a4434f1ce2b94ac798028b9bb12c983a
2020-11-19 19:19:59 -05:00
Marek Roszko d7e10c22c6 dxflib_qcad: match rename of DimAngularData to DimAngularData2L
upstream 1655be6c7d58609397e9f04cfaff08336d69b20e
2020-11-19 19:19:59 -05:00
Marek Roszko baebf7036f dxflib_qcad: Saving dimension with custom text position
upstream commit b4c74180a6857c7b63f7a71e1236930e85c15134
2020-11-19 19:19:59 -05:00
Marek Roszko 5ea6755594 dxflib_qcad: add dimscale support for leaders
upstream commit
049e1bf95138f32360609b83372e358963a9dd9c
2020-11-19 19:19:59 -05:00
Marek Roszko ac31cee0cc dxflib_qcad: fix DL_POLYLINE3D flag definition
upstream commit
3504cddee254bec2240456d8b3acbbc2dec06fef
2020-11-19 19:19:58 -05:00
Marek Roszko 4b890212ba dxflib_qcad: fix LWPOLYLINE without Z values
upstream commit
715f02eee3f76e3862aeb788a2c814334f74186d
2020-11-19 19:19:58 -05:00
Marek Roszko 7fd37c39a1 dxflib_qcad: backport "cleanup"
upstream commits
6a43fa3c6d6a99f73bda7a36eaf3b78906d41380
f2db48daf183575a3767beed6345767901803cb9
722ee2223069afac1b5a3c02812242cd9f723b8a
2020-11-19 19:19:58 -05:00
Marek Roszko 1703eb8494 dxflib_qcad: cherry std::istream usage
upstream e0046e6dbff8148f5d8ef8e3f149ad99384c67a8
2020-11-19 19:19:58 -05:00
Marek Roszko e8ae7e91e2 Fix MSVC warnings in dl_dxf.cpp 2020-11-19 01:24:32 -05:00
Marek Roszko d0e504f26e Better name the include guard 2020-11-19 01:06:29 -05:00
Marek Roszko f7065a2643 Add missing include guard in gzip-hpp 2020-11-19 01:04:42 -05:00
Marek Roszko 9115f6031f Suppress msvc warning due to pragma gcc 2020-11-19 01:03:58 -05:00
Ian McInerney 11e6cac42b Introduce EGL backend support for the OpenGL canvas
wxWidgets 3.1.5+ on Linux will compile with the Wayland EGL
canvas as the backend instead of the X11 backend. This requires a
version of GLEW compiled with the proper EGL defines and a different
header/code for certain parts that are X11 GLEW specific.

This introduces an in-tree version of GLEW that will be built with the
GLEW_EGL flag then statically linked into the KiCad executables when
EGL support is needed.
2020-11-11 00:41:02 +00:00
Jeff Young a730478d5d Fixes to Clipper fixes.
Clipper was only broken when rounding down, not when rounding up.
2020-11-04 15:25:44 +00:00
Jeff Young 791a50b493 Remove work-around in favour of real fix in Clipper. 2020-11-04 11:21:45 +00:00
Dominik Wernberger 6a93b523cf Add const specifier 2020-10-13 17:51:59 +00:00
Ian McInerney 00058f79d1 Update lemon to most recent upstream version
This fixes a missing variable initialization.
2020-09-22 12:34:05 +01:00
Ian McInerney 2becd368d9 Thirdparty: Properly handle error condition in nanosvg
ftell() returns -1 on an error, so it must be a long return
type, and we should test for its failure.

(found by Coverity)
2020-09-20 22:39:31 +01:00
Ian McInerney 68985490c6 Update lemon and its template to most recent upstream version
This should fix some Coverity warnings about memory management
in the lemon tool (less critical), but also fix improper
memory accesses in the generated parsers (labeled critical
by Coverity).

Ref: https://sqlite.org/forum/forumpost/edecf32da3
2020-09-20 22:27:11 +01:00
Marek Roszko f9e379c82a Minor format 2020-08-28 02:30:04 +00:00
Marek Roszko cb013604a9 jump_fcontext should set the outValue of fiber being switched to rather the one being switched from
Fixes #5162
2020-08-28 02:30:04 +00:00
Marek Roszko 3b1f1f7b6a Use CreateFiberEx instead of CreateFiber, ConvertThreadToFiberEx instead of ConvertThreadToFiber
- Allows specifying FIBER_FLAG_FLOAT_SWITCH to save FP registers (it doesnt by default on win32 but does on win64)
- Specify a commit stack size one byte less than the reserve stack size or else Windows rounds up to the nearest allocation size above the desired size
2020-08-28 02:30:04 +00:00
Seth Hillbrand a38c2aad1f ADDED: Support compressed STEP and VRML files
This adds support for opening .stpZ, step.gz and .wrz files where the
files have been compressed using ZIP or gzip according to the "standard"
published by the MBx volunteer forum at
https://www.cax-if.org/documents/rec_prac_file_compression_v12.pdf

Fixes https://gitlab.com/kicad/code/kicad/issues/2479
2020-08-19 03:20:30 +00:00
Tomasz Wlostowski 8b716b2b5c thirdparty/lemon: post-rebase fixes 2020-08-13 14:50:59 +02:00
Tomasz Wlostowski 4abe71d2ef libeval_compiler: implemented unary +/- operators 2020-08-13 14:50:59 +02:00
Tomasz Wlostowski c88c8102e5 libeval_compiler: fixed segfault for "(number)" expressions. 2020-08-13 14:50:59 +02:00
Tomasz Wlostowski a5a06e3c89 libeval_compiler: general clean up of the Lemon grammar + some smart pointers + killed all memory leaks. WIP! 2020-08-13 14:50:59 +02:00
Seth Hillbrand 7c455f2357 First pass at DRC RTree functionality
This implements a copper-layer RTree with functions for iterating over
the elements in a copper layer and providing Nearest Neighbor returns
for BOARD_CONNECTED_ITEMS
2020-08-11 16:52:29 -07:00
Ian McInerney 0a1d8c1aaa Move lemon parser generation into build directory
This moves the generated files out of the source tree and into
the build directory. They are now regenerated each time they are
needed, based on the timestamp of the generated file compared to
the timestamp of the lemon file.

To do this, we also bundle lemon into the thirdparty directory
and build it for ourselves since it is a very tiny program and
not all platforms seem to distribute it in a consistent manner.

Fixes https://gitlab.com/kicad/code/kicad/issues/5013
2020-08-10 13:53:54 +00:00
Jeff Young 16c645bfd9 Quiet the CLang compiler.
(It's a false-positive, but CLang doesn't seem to know any better.)
2020-08-02 22:45:48 +01:00
Jon Evans 0d70cb70ea Update nlohmann::json to 3.9.0
Release notes:
https://github.com/nlohmann/json/releases/tag/v3.9.0
2020-08-02 13:11:16 +00:00
Seth Hillbrand acf4756e73 Remove extraneous build warning 2020-07-25 14:10:53 -07:00
Tomasz Wlostowski 151b4e4e5e libcontext: clean up own's shit when coroutine call is over (MSVC only) 2020-07-22 16:57:54 +02:00
Ian McInerney b5adf5bb21 Only try to remove the implicit conversion warning if it is supported 2020-07-03 02:59:19 +01:00
Seth Hillbrand 4ef02fd699 Replace TTL delauney triangulator
Removes the TTL triangulator in favor of the delaunator triangulator.
This removes the only AGPL code in the KiCad codebase and therefore
allows the full project to be licensed under the GPLv3.
2020-06-25 18:45:27 +00:00
Ian McInerney e4b6487fca Overhaul compiler warnings infrastructure
* Track our warnings separate from normal flags
* Remove all warnings from the SWIG code
* Add more GCC warnings
2020-05-06 01:47:20 +01:00
Thomas Pointhuber b707c84b62 Use Record handling for parsing
Now, we know how big a record is, and should be able to parse all boards without missing bytes?
2020-04-03 23:22:24 +00:00
jean-pierre charras 48fba00eb4 Fix a compil warning.
Fixes #3964
https://gitlab.com/kicad/code/kicad/issues/3964
2020-03-05 09:54:14 +01:00
Jon Evans 1449af40ed Add forward-declaration header for nlohmann/json 2020-02-19 23:43:43 -05:00
jean-pierre charras 79e7a27492 Fix a few Coverity warnings. 2020-02-02 08:55:24 +01:00