Currently, kicad_pcb files have a (version ...) tag, but it is ignored. This
commit does the following:
1. Parse the version. If it's later than the last supported version, present an
alternative error message suggesting an upgrade if the file does not load
correctly. The version will be interpreted as an integer YYYYMMDD to suggest
a KiCad release date.
2. Accept a (version ...) tag also in kicad_mod files, but do not write them
yet. If no version tag is present in these files, assume the version to be that
of the current format version at the time of this commit.
This is meant to be merged to the 4.x stable series, and preps for KiCad 5
which will start emitting version tags also in footprints - users with what
will then be 'old stable' will not get a parse error when we introduce this for
footprints, and we can safely increment the format version later.
* Add footprint methods to PCB_IO.
* Add FP_CACHE and FP_CACHE_ITEM for handling new footprint library design.
* Add code to save legacy libraries in new format.
* Change behavior of BOARD_ITEM::GetLayerName() to return the default layer
name when the item does not have a BOARD as a parent.
* Minor changes to the module output formatter when writing to module library
files (no BOARD as parent).
* Add new (and some that I forgot along the way) CMake flags to
EDA_BASE_FRAME::CopyVersionInfoToClipboard().
* Add -Wno-narrowing to GCC flags to stop GCC 4.7 from complaining about
a conversion from int to unsigned in the Boost polygon library.
* Add INPUT_STREAM_READER to richio.cpp to allow using any object derived
from wxInputStream as a LINE_READER (needs to be validated).
* Correct all user strings and comments for the correct capitalization of
application names according to JP. They are KiCad, Pcbnew, CvPcb,
Eeschema, and GerbView.
* Add a note the the user interface policy about the correct capitalization.
* macros.h now has TO_UTF8() and FROM_UTF8() which are working converters
to and from UTF-8 encoding for any wxWidgets build mode. We can switch to
them at any time. I am using them now for specctra conversions and
elsewhere where I wanted gauranteed UTF8 encoding.
* added OUTPUTFORMATTER::Quoted( const wxString& ) to simplify converting
to UTF8 encoded s-expression atoms. The recommended technique is now simply:
out->Quoted( wxString ).c_str()
* DSNLEXER::NextTok() now uses two separate modes to parse quoted strings.
This gives us the freedom to control our own destiny separate from the
constraints put on us by the Specctra DSN spec.
* Added Documentation/s-expressions.txt to explain all this.
* Enhanced our quoting protocol by moving away from doubling up double quotes
to a C line escape mechanism.
* Now support multi-line strings, which when properly escaped, can still be
read in as a token originating on a single line.
* DSNLEXER now owns an abstract LINE_READER by pointer so that polymorphism
can be used in alternative LINE_READERS.
* Write FILE_LINE_READER and STRING_LINE_READER. The latter can be used
to parse text coming from the clipboard or other string source.
constructor takes a keyword table, so it can be used for arbitrary DSN
syntax files of your own chosing. Simply create an enum {} with all your
unique tokens in it. Then create a KEYWORD table. See SPECCTRA_DB::keywords[].
The reason you want an enum is to give the C++ debugger better type information
so it can show symbolic integer symbols.
* Factored out common richio.cpp and richio.h
which is what DSNLEXER uses.
* Fixed some minor issues with reading circuit descriptor from a *.dsn file.