/mORMot/SynCommons.pas
https://bitbucket.org/sas_team/sas.requires · Pascal · 58304 lines · 42541 code · 3634 blank · 12129 comment · 4784 complexity · 31b9de4c98a1393c30d5e2b5ff69db45 MD5 · raw file
Large files are truncated click here to view the full file
- /// common functions used by most Synopse projects
- // - this unit is a part of the freeware Synopse mORMot framework,
- // licensed under a MPL/GPL/LGPL tri-license; version 1.18
- unit SynCommons;
-
- (*
- This file is part of Synopse framework.
-
- Synopse framework. Copyright (C) 2016 Arnaud Bouchez
- Synopse Informatique - http://synopse.info
-
- *** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the License.
-
- The Original Code is Synopse framework.
-
- The Initial Developer of the Original Code is Arnaud Bouchez.
-
- Portions created by the Initial Developer are Copyright (C) 2016
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
- - Aleksandr (sha)
- - Alfred Glaenzer (alf)
- - BigStar
- - itSDS
- - Johan Bontes
- - kevinday
- - mazinsw
- - Marius Maximus (mariuszekpl)
- - RalfS
- - Sanyin
- - Pavel (mpv)
- - Wloochacz
- - zed
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK *****
-
- Version 1.7
- - first public release, corresponding to SQLite3 Framework 1.7
-
- Version 1.8
- - includes Unitary Testing class and functions
- - bug fixed in WinAnsiBufferToUtf8() and all WinAnsi to UTF-8 encoding
- functions (issue identified thanks to new _UTF8 testing function)
- - bug fixed in val() under Delphi 2009/2010 for some values (issue identified
- thanks to new NumericalConversion testing function)
- - bug fixed in AnsiICompW() - used in SynPdf unit
- - ambiguous SameText() function rewritten as SameTextU() with UTF-8 decoding
- - TTextWriter class moved from SQLite3Commons to SynCommons
- - new JSONEncode and JSONDecode functions to directly encode or decode any
- content to/from a valid UTF-8 JSON object content
- - enhanced URLEncode() and URLDecode() functions
- - new ExtendedToStr/ExtendedToString functions
- - new tests added (mostly relative to the new functions or classes)
-
- Version 1.9
- - now compiles under CrossKylix, and tested under Linux
- - new JSONEncodeArray procedures, to create JSON array content from
- supplied Delphi arrays (handle RawUTF8 text, double or integer arrays)
- - new AddCSV methods in TTextWriter handling Delphi arrays to be added
- as Comma-Separated-Values (handle RawUTF8 text, double or integer arrays)
- - new definition of PtrInt/PtrUInt, to match NativeInt/NativeUInt types,
- available since Delphi 2007 - some code rewrite in order to avoid any
- implicit conversion from/to integer/cardinal
-
- Version 1.9.2
- - new StringReplaceChars function
-
- Version 1.10
- - code modifications to compile with Delphi 6 compiler (Delphi 5 failed due
- to some obscure compiler bugs in SynCrypto.pas)
-
- Version 1.11
- - fix some obscure Delphi 2009 bug according to NativeUInt :(
- - source code modified to be 7 bit Ansi (so will work with all encodings)
- - a lot of code refactoring for our internal fork of ZeosLib
- (e.g. ISO 8601 date time extracted from SQLite3Commons, QuotedStr..)
- - new TRawUTF8List class, which is able to emulate a TStringList with our
- native UTF-8 string type (cross-compiler, from Delphi 6 up to XE)
- - new TRawUTF8Stream class, to typecast a RawUTF8 into a TStream
- - new IsWow64 and SystemInfo global variables
-
- Version 1.12
- - fixed issue "JSON floats decimal separator depends on language settings"
- - new UTF8ToWideChar() overloaded function, with MaxDestChars parameter
- - new FillIncreasing() procedure
- - now handle our 32/64-bit variable-length integer encoding, via new
- FromVarUInt32/64 and ToVarUInt32/64 functions
- - new TFileBufferReader and TFileBufferWriter objects, implementing very fast
- read/write access to huge files, with new 32/64-bit variable-length integer
- encoding and optimized storage of IDs or Offsets (used in TSynBigTable)
- - new function UnQuoteSQLString()
- - another review of Pos() calls in the code (now use our fast PosEx)
- - TSynMemoryStream now replaces TRawUTF8Stream class, with constructors using
- either an AnsiString, either a memory buffer
- - new TSynTable, TSynTableFieldProperties and TSynTableStatement classes
- to handle a generic database table storing field values using our SBF
- compact binary format (more compact than BSON, similar to Protocol Buffers)
- - new WinAnsiToUnicodeString and Ansi7ToString functions
- - new TTextWriter.AddBinToHex method
- - new CompareOperator() functions and associated TCompareOperator type
- - new IntToThousandString() function (used for TSynTests e.g.)
- - new CreateInternalWindow() for creating a Windows Message handler in any object
-
- Version 1.13
- - unit now compiles and works with Delphi 5 compiler
- - new low-level RTTI functions for handling record types: RecordEquals,
- RecordSave, RecordSaveLength, RecordLoad, RecordClear and RecordCopy
- - new TDynArray object, which is a wrapper around any dynamic array: you can
- now access to the dynamic array using TList-like properties and methods,
- e.g. Count, Add, Insert, Delete, Clear, IndexOf, Find, Sort and some
- new methods like LoadFromStream, SaveToStream, LoadFrom and SaveTo which
- allow fast binary serialization of any dynamic array, even containing
- strings or records; a CreateOrderedIndex method is also available to
- create individual index according to the dynamic array content; and any
- dynamic array can be serialized as UTF-8 JSON via TTextWriter.AddDynArrayJSON
- and TDynArray.LoadFromJSON methods
- - introducing direct content filtering and validation using
- TSynFilterOrValidate dedicated classes, for both TSQLRecord and SynBigTable
- - filtering is handled via some TSynFilter classes - TSynFilterUpperCase,
- TSynFilterUpperCaseU, TSynFilterLowerCase, TSynFilterLowerCaseU and
- TSynFilterTrim e.g.
- - validation is handled via some TSynValidate classes - TSynValidateRest,
- TSynValidateIPAddress, TSynValidateEmail, TSynValidatePattern,
- TSynValidatePatternI, TSynValidateText, TSynValidatePassWord e.g.
- - dedicated TSynTableFieldProperties.Validate method for validation (e.g. a
- TSynValidateTableUniqueField instance is created if tfoUnique is in Options)
- - dedicated TSynTableFieldProperties.Filter method for filtering (using
- common TSynFilter classes, working at UTF-8 Text content)
- - faster implementation of Move() for Delphi versions with no FastCode inside
- - new ConvertCaseUTF8(), UpperCaseU(), LowerCaseU(), Int64ToUInt32(),
- GetCardinalDef(), IsValidEmail, IsValidIP4Address(), PatchCodePtrUInt(),
- GetCaptionFromClass(), GetDisplayNameFromClass(), DateTimeToIso8601Text()
- StrUInt32(), StringBufferToUtf8(), IsZero(), AddPrefixToCSV(), IntToString(),
- RawUTF8DynArrayEquals(), FromVarString(), GetBitCSV(), SetBitCSV()
- procedures or functions (with associated tests)
- - new grep-like IsMatch() function for basic pattern matching
- - new BinToBase64, Base64ToBin and IsBase64 *fast* conversion functions
- (with optimized assembler version, using CPU pipelining and lookup table)
- - introducing the GarbageCollector TObjectList for handling a global garbage
- collector for instances which must live during the whole executable process
- (used e.g. to avoid a memory leak for "class var" or such variables)
- - new TSynLog class to handle enhanced logging to any application, with
- exception handling (+stack trace) and customer-side performance profiling
- - new TSynMapFile class to retrieve debugging information from .map file (and
- able to save and read smaller .mab files) - used by TSynLog if available
- - new TSynTestsLogged test suit class, with automated test case logging
- - Windows version detection enhanced, now retrieving TWindowsVersion enumerate
- - great performance improvement in TSynTableFieldProperties for update process
- - added TMemoryMap and TSynMemoryStreamMapped to handle memory-mapped files
- - added TMemoryMapText class to fast handle big UTF-8 text files (like logs)
- - now TTextWriter can have a custom internal buffer size (default 4096 bytes)
- - now TFileBufferWriter and TFileVersion are regular classes, not an
- object/record any more (this was incoherent since Delphi 2010)
- - new TFileBufferReader.OpenFrom(Stream) and ReadRawUTF8 methods
- - now TSynCache will use faster TDynArrayHashed for its content hashing
- - new Escape: TTextWriterKind optional parameter for TTextWriter.Add()
- - new SynLZ related compression functions: FileSynLZ/FileUnSynLZ and
- StreamSynLZ/StreamUnSynLZ
- - source can now be parsed per all Delphi IDE pre-parser (dual declaration as
- record or object because of Delphi 2010 and up was not understood)
- - fixed issue in TSynTable.Data() method: ID was not set as expected
- - fixed issue in TSynTableFieldProperties: wrong constraint evaluation and
- index refresh at records update
- - fixed issue in ToVarUInt32Length/ToVarUInt32LengthWithData
-
- Version 1.14
- - fix issues with Curr64ToStr() and Curr64ToPChar() with negative amounts,
- with some speed enhancements and new associated tests
- - fixed issue in produced JSON stream using '=' instead of ':'
- - new DoubleToStr(), StrCurr64(), UnicodeBufferToString(),
- RawUnicodeToString(), FillChar(), UpperCopy255W(), GetCaptionFromEnum(),
- SortDynArrayUnicodeString(), SortDynArrayUnicodeStringI() functions
-
- Version 1.15
- - unit now tested with Delphi XE2 (32 Bit)
- - TSynLog now writes the elapsed time (in us) for Enter/Leave events, and
- will flush the log content to disk on any exception (for safety)
- - new sllTrace and sllWarning levels for TSynLog class
- - new TSynLog.DefaultExtension property (set to '.log' by default)
- - new TSynLogFile.LogProc[] property for customer-side method profiling,
- with LogProcSort method available for sorting the resulting array, and
- LogProcMerged property to merge the location name timing
- - new TSynMapFile.FindLocation method for high-level .map symbol access
- - TSynMapFile now handles huge .map file (bigger default in-memory buffer)
- - fix potential GPF issue in code using ConvertHexToBin[]
- - new TSynLog.EventCount method
- - new TMemoryMapText.LineContains method for fast case-insensitive search
- - TSynTests now writes the elapsed time in each test in the final report
- - faster late binding process for our variants custom types (i.e.
- TSynTableVariantType and TSQLDBRowVariantType): you can call
- SynRegisterCustomVariantType() function to register any other custom
- variant type, and enhance GetProperty/SetProperty process speed
- - includes our optimized RecordCopy procedure in replacement to the slower
- default System.@CopyRecord internal RTL function
- - our optimized Move() and FillChar() will replace the default System RTL
- function, for Delphi versions prior to 2007 (which didn't contain those)
- - new AnsiCharToUTF8(), StringToWinAnsi(), WideStringToWinAnsi(),
- WideStringToUTF8(), CSVOfValue(), IdemPCharArray(), FindUnicode(),
- UpperCaseUnicode(), LowerCaseUnicode() and Split() functions
- - faster GetInt64() function
- - Iso8601ToSecondsPUTF8Char() now returns 0 in case of unexpected format
- - fixed issue in StrCurr64() low-level conversion routine
- - fixed issue in Utf8DecodeToRawUnicodeUI() function
- - new TSynTableFieldProperties.OrderedIndexRefresh method, to allow access
- on OrderedIndex[] even if the index needs to be refreshed
- - new TDynArrayHashed.AddAndMakeUniqueName() method and Hash[] property
- - new TRawByteStringStream class (a TStream using a RawByteString as internal
- storage), especially useful since Delphi 2009
- - new TSynNameValue object, to efficiently handle Name/Value RawUTF8 pairs
- (using hashing for Name search)
- - TTextWriter.CreateOwnedStream now create an internal TRawByteStringStream
- instance for faster process and direct retrieval in the Text method
- - JSONEncode*() global functions will use an internal TRawByteStringStream
- instead of a supplied TMemoryStream
- - new FormatUTF8() overloaded function, handling both '%' and '?' parameters
- (inserting '?' as inlined :(...): parameters, with proper string quote) -
- with associated regression tests
-
- Version 1.16
- - introducing new TSynAnsiConvert and TSynAnsiFixedWidth classes, able to
- process Unicode to/from Ansi conversion in all possible code pages, with
- generic access methods and optimized handling of fixed width encodings
- - added dedicated Exception classes (ESynException, ETableDataException)
- - TSynLog allows read sharing of the .log created file
- - TSynLog now stores the executable build time, and library name (if any) -
- this is a small change of the .log format as expected by the LogViewer tool
- (so you should upgrade your LogViewer.exe to its latest version)
- - TSynLog and TSynMapFile now handle libraries (.dll/.ocx/.bpl) .map/.mab
- debugging information (only .exe was previously handled)
- - TSynCache now handles an optional Tag: PtrInt value parameter (used e.g.
- to store the row counts of a SQL result cache in mORMot)
- - TSynCache now uses the generic TSynNameValue object from its internal
- hashed list implementation (avoid duplicated code)
- - TMemoryMapText class (and therefore TSynLogFile) is now able to map/open
- an existing file: it will allow e.g. the SynLogViewer to browse a .log file
- which is actually still opened and working by the main application
- - faster RawUnicodeToUtf8() and UTF8ToWideChar() functions, thanks to very
- clever speed-up proposals by Sha (also included in TSynAnsi* classes)
- - JSONDecode() overloaded functions now accept parameter names without case
- sensibility (and a new HandleValuesAsObjectOrArray parameter)
- - new JSONDecode() overloaded function, to properly handle unserialization
- of a JSON object within a buffer (used e.g. for TDynArrayJSONCustomReader)
- - JSON functions now handle '0' as number according to http://json.org specs
- - new TTextWriter.AddJSONEscape() overloaded function, to be used to directly
- serialize some name/value pairs as a JSON object content (used e.g. for
- TDynArrayJSONCustomWriter callbacks)
- - new FileSize(), RoundTo2Digits() and RawByteStringArrayConcat() functions
- - new TPrecisionTimer Pause and Resume methods
- - new TSynTestCase.CheckFailed method (most of the time, Check is sufficient)
- - new TSynLogFamily.IncludeComputerNameInFileName property
- - new TTextWriter.WrRecord method for direct adding of a Base-64 record content
- - new TTextWriter.AddNoJSONEscapeString method
- - new TRawUTF8ListHashed class, with extend TRawUTF8List by using an internal
- hash table to optimized IndexOf() method call (including case sensitivity)
- - new ToVarInt64() and FromVarInt64() functions to encode and decode
- variable-length signed Int64 values (with the corresponding new tftVarInt64
- kind of variable-length column in TSynTableFieldType enumeration)
- - new GotoNextJSONObjectOrArray() and RawUTF8ArrayToQuotedCSV() functions
- - new ReadStringFromStream() and WriteStringToStream() functions
- - fixed some compilation warnings with Delphi XE and XE2
- - fixed issue in TDynArrayHashed if you do not use the external Count
- - fixed potential GPF in TDynArrayHashed.ReHash after TDynArray.Clear call
- - fixed issue in TSynTableFieldProperties.SaveTo about saving wrong indexes
- - fixed issue TSynTableStatement when only one column was retrieved
- - fixed rounding issue in ExtendedToString() and all corresponding wrappers
- like DoubleToStr*, Add(Double...)
- - fixed issue in Hash32() implementation (potential GPF when reading ahead
- by DWORD - get rid of unnecessary asm optimization)
- - fixed issues in function IsJSONString() which returned TRUE for '-' or '+',
- or false positives in some border-line cases (due to wrong uppercase guess):
- now this function is split into IsString() and IsStringJSON() functions
- to explicitely handle null/false/true constant recognition
- - fixed potential false positives of null/false/true in function GetJSONField
- - get rid of wrong "Decimal" parameter in float to text conversion
- - TFileBufferWriter.Create now accepts up to 4 MB internal buffer size
- - increased TDynArrayHashed number of void entries (for speed)
- - modified TDynArray.SaveToStream/LoadFromStream to read or save the data
- from the current stream position
- - fixed GPF in TDynArray.SaveTo in case of invalid internal record layout
- - modified StreamUnSynLZ() so that Source stream will point after all read data
- - TDynArray.SaveToStream() method can now save to any TStream class
- - added TTextWriter.RegisterCustomJSONSerializer() method to allow JSON
- serialization of any dynamic array content (used by TDynArray.LoadFromJSON
- and TTextWriter.AddDynArrayJSON) and record content (used by RecordLoadJSON
- and TTextWriter.AddRecordJSON)
- - added USEPACKAGES conditional to help compiling the unit within packages
- - added optional DOPATCHTRTL to patch the RTL (e.g. RecordCopy, RecordClear
- TObject.CleanupInstance low-level functions) only if needed (not patched
- by default, for compatibility reasons) - you may want to use our Enhanced
- RTL patchs instead for a whole better response
- - new function BinToBase64URI()
- - circumvent some bugs of Delphi XE2 background compiler (main compiler is OK)
- - add premilinary Windows 8 operating system detection (as wEight/wEightServer)
-
- Version 1.17
- - check of QueryPerformanceFrequency failure, and rollback to low-resolution timer
- - handle properly old .synlz layout (reading compatibility was broken)
- - added TObjectListHashed class, which behaves like TList/TObjectList, but
- will use hashing for (much) faster IndexOf() method, and associated
- TObjectListPropertyHashed class, which allows hashing of a sub-property
- of an object (including some changes made to TDynArray/TDynArrayHashed)
- - new TTextWriter.AddDateTime() overloaded method able to quote the output
- - new TTextWriter.AddFloatStr() method handling partial floating-point text
- - both TTextWriter.AddDateTime() overloaded methods will store '' when value
- is 0, or a pure ISO-8601 date or time if the value is defined as such,
- just as expected by http://www.sqlite.org/lang_datefunc.html - it will also
- reduce average generated JSON/text content size
- - fixed issue about BLOB unproperly serialized into JSON (e.g. now uses null)
- - fixed ticket [e5ad3684b2] about some .map files parsing in TSynMapFile
- - TSynLog stack tracing uses low-level RtlCaptureStackBackTrace() API on CPU64
- - changed the non expanded JSON format to use lowercase first column names:
- {"fieldCount":1,"values":["col1"... instead of {"FieldCount":1,"Values":[..
- - new SetInt64() procedure for direct assignment of the result
- - TSynTableStatement class now accepts '_' in table and column identifiers
- - fixed implementation issue in function FindNextUTF8WordBegin()
- - fixed false negative issue in TSynSoundEx.UTF8 and TSynSoundEx.Ansi
- - fixed wrong UTF-8 encoding of U+FFF0 used for JSON_BASE64_MAGIC
- - added an optional parameter to StrToCurr64() function, able to return
- a true Int64 value if no decimal is supplied within the input text buffer
- - enhanced TSynAnsiFixedWidth.UnicodeBufferToAnsi average process speed
- - TSynCache.Reset now returns a boolean stating if something was flushed
- - new SynUnicodeToUtf8(), ShortStringToUTF8(), StringToSynUnicode(),
- SynUnicodeToString() functions
- - new StrToCurrency() wrapper function
- - new IdemPropName() overloaded function with two PUTF8Char arguments
- - new UTF8UpperCopy() and UTF8UpperCopy255() optimized functions
- - new GotoNextNotSpace() and GotoEndOfQuotedString() functions
- - new TMemoryMap.Map() method expecting a file name as parameter
- - new TRawUTF8List.LoadFromFile method
- - new DateToSQL(), DateTimeToSQL() and Iso8601ToSQL() functions, returning
- a string with a JSON_SQLDATE_MAGIC prefix and proper UTF-8/ISO-8601 encoding
- to be inlined as ? bound parameter in any SQL query (allow binding of
- date/time parameters as request by some external database engine
- which does not accept ISO-8601 text in this case)
- - added TDynArray.Equals() method to compare two arrays efficiently
- - added TDynArray and TDynArrayHashed InitSpecific() method able to specify
- how (hashing and) comparison should be processed for a given record
- (includes also some TDynArray/TDynArrayHashed refactoring and optimization)
- - new TObjectHash abstract class to use hashing to find an object
- - TTextWriter.AddJSONEscape() method speed up
- - moved logging threadvars and associated structures into hidden internal
- declaration, for better work with packages (avoid W1032 warning)
- - now JSON parser will handle #1..' ' chars as whitespace (not only ' ')
- - now JSON parser will allow whitespace inserted between any pair of tokens,
- even after true/false/null, as expected by the specification
- - fixed potential Integer Overflow error in Iso8601ToDateTimePUTF8Char*()
- - added PatchCode() and RedirectCodeRestore() procedures, and some code
- refactoring about process in-memory code patching
- - internal FillChar() will now use faster SSE2 instructions on supported CPUs
-
- Version 1.18
- - BREAKING CHANGE: SynLog.pas and SynTests.pas were extracted from SynCommons
- - BREAKING CHANGE of TTextWriter.WriteObject() method: serialization is now
- defined with a new TTextWriterWriteObjectOptions set
- - BREAKING CHANGE rename of Iso8601 low-level structure as TTimeLogBits, to use
- explicitly the TTimeLog type and name for all Int64 bit-oriented functions -
- now "Iso8601" naming will be only for standard ISO-8601 text, not Int64 value
- - BREAKING CHANGE: TTextWriter.Add(Format) won't handle the alternate $ % tags
- any more, unless you define the OLDTEXTWRITERFORMAT conditional
- - BREAKING CHANGE: TTextWriter.AddDouble() and AddSingle() dedicated methods
- replacing ambiquituous Add(), which was not appropriate for single values
- - BREAKING CHANGE: FormatUTF8() and TTextWriter.Add(Format) PUTF8Char type for
- constant text parameter has been changed into RawUTF8, to let the compiler
- handle any Unicode content as expected
- - RawByteString is now defined as "= type AnsiString" under non Unicode Delphi
- so that it would be recognized with its own encoding (pseudo code page 65535)
- - Delphi XE4/XE5/XE6/XE7/XE8/10/10.1 compatibility (Win32/Win64 target
- platforms only for the SynCommons and mORMot* units, but SynCrossPlatform*
- supports clients on all other targets, including OSX and NextGen compilers)
- - unit fixed and tested with Delphi XE2 (and up) 64-bit compiler under Windows
- - now all variants created within our units will create string instances of
- kind varString and type RawUTF8 - prior to Delphi 2009, ensure you call
- UTF8ToString(aVariant) if you want to use the value with the VCL
- - introducing TDocVariant for variant-based process of any hierarchy
- of objects and/or arrays, with late binding optimized access and JSON
- serialization/unserialization (will also be used for BSON documents storage)
- - UTF-8 process will now handle UTF-16 surrogates - see ticket [4a0382367d] -
- UnicodeCharToUTF8/NextUTF8Char are renamed WideCharToUTF8/NextUTF8UCS4 and
- new UTF16CharToUTF8/UCS4ToUTF8 functions have been introduced
- - added ToUTF8() overloaded functions, which could be used on most simple types
- - introducing TSynTimeZone class, for cross-platform local time handling
- - added TextColor() and TextBackground() functions - will initialize internal
- console process after any manual AllocConsole call
- - added ConsoleWaitForEnterKey function, able to handle Synchronize() calls
- - StrLen() function will now use SSE2 or SSE4.2 instructions on supported CPUs
- - introduced StrLenPas() function, to be used when buffer is protected
- - UpperCopy255Buf() function will use SSE4.2 instrctions on supported CPUs
- to speed up e.g. HashAnsiStringI()
- - included Windows-1258 code page to be recognized as a fixed-width charset
- - TSynAnsiFixedWidth.Create(CODEPAGE_US) will now use a hard-coded table,
- since some Russian system do tweak the registry to force 1252 page maps 1251
- - introducing TSynAnsiUTF8/TSynAnsiUTF16 to handle CP_UTF8/CP_UTF16 codepages
- - added UTF8AnsiConvert instance, and let TSynAnsiConvert.Engine(0) return
- the main CurrentAnsiConvert instance
- - StrComp/StrIComp/StrLen() functions will now expect blank pointers, to
- circumvent type mismatchs when passing PAnsiChar or PUTF8Char buffers
- - get rid of 12 maximum count of supplied argument in FormatUTF8()
- - FormatUTF8() and VarRecToUTF8() will append the class name of any TObject
- - added JSONFormat optional parameter to FormatUTF8() to produce valid JSON
- content from a given set of values identified by ? - used e.g. by _JsonFmt()
- - added ESynException.CreateUTF8() constructor, more powerful than the
- default Exception.CreateFmt(): this CreateUTF8 method is now used everywhere
- - added QuotedStrJSON() and NextNotSpaceCharIs() functions
- - refactored GetMimeContentType() implementation - see also [fca72ba0ce] -
- and introduced GetMimeContentTypeHeader() function
- - added MultiPartFormDataDecode() to decode multipart/form-data POST requests
- - included x64 asm of FillChar() and Move() for Win64 - Delphi RTL will be
- patched at startup, if the DOPATCHTRTL conditional is defined
- - introduced FillcharFast() and MoveFast() global function variables,
- pointing to optimized asm versions, depending on the CPU abilities
- - FastCode-based x86 asm Move() procedure will handle source=dest
- - faster x86/x64 asm versions of StrUInt32() StrInt32() StrInt64() functions
- - new StrUInt64(), UniqueRawUTF8(), FastNewRawUTF8() and SetRawUTF8() functions
- - introducing UTF8ToInteger() overloaded functions
- - recognize 8.1 and upcoming "Threshold" 9 in TWindowsVersion
- - added TypeInfo, ElemSize, ElemType read-only properties to TDynArray
- - added DynArrayLoad() and DynArraySave() helper functions
- - introducing TObjectDynArrayWrapper class and IObjectDynArray interface
- - introducing T*ObjArray dynamic array storage via ObjArrayAdd/ObjArrayFind/
- ObjArrayDelete/ObjArraySort and ObjArrayClear functions
- - introducing T*InterfaceArray dynamic array storage via InterfaceArrayAdd/
- InterfaceArrayFind/InterfaceArrayDelete functions
- - added TPersistentWithCustomCreate, TInterfacedObjectWithCustomCreate and
- TSynPersistent abstract classes, allowing to define virtual constructors for
- TPersistent kind of objects (used e.g. with internal JSON serialization,
- for interface-based services, or for DDD objects)
- - introducing TSynPersistentLocked and TInterfacedObjectLocked classes,
- avoiding CPU cache line performance issue (so to be preferred to TMonitor or
- TCriticalSection)
- - new TSynPersistentWithPassword class, able to store the password with
- a custom simple encryption when serialized as JSON
- - introducing TSynAuthentication class for simple generic authentication
- - introducing TSynConnectionDefinition class used e.g. for JSON-defined
- runtime instantiation of a TSQLDBConnectionProperties or TSQLRest instance
- - added TDynArrayHashed.HashElement property
- - new TDynArrayHashed.AddUniqueName() method
- - introduced TSingleDynArray, recognized as such in JSON serialization
- - fixed "single" floating-point values JSON serialization
- - added WordScanIndex() and swap32() functions
- - speed improvement of IdemPropNameU() function, with new overload function
- - now FileSize() function won't raise any exception if the file does not exist
- and will return any size > 2 GB as expected
- - faster PosEx() function in pure pascal mode (based on Avatar Zondertau work)
- - introducing StreamToRawByteString() / RawByteStringToStream() functions
- - introducing RawByteStringToBytes() / BytesToRawByteString() functions
- - added StringDynArrayToRawUTF8DynArray() and StringListToRawUTF8DynArray()
- - added CSVToRawUTF8DynArray() overloaded functions
- - added GetLastCSVItem() function and dedicated HashPointer() function
- - added DirectoryDelete() and EnsureDirectoryExists() function
- - added FileOpenSequentialRead() function, used e.g. by StringFromFile()
- - added GetNextItemInteger(), GetNextItemCardinalStrict() and UpperCaseCopy()
- - added GetEnumNameValue() and UnQuotedSQLSymbolName() functions
- - added JSONEncodeArrayOfConst() function
- - JSONEncode() and TTextWriter.AddJSONEscape() with NameValuePairs parameters
- will now handle nested arrays or objects specified with '['..']' or '{'..'}'
- and nil parameter as null JSON value
- - new TTextWriter.AddJSON() method and JSONEncode() overloaded function able
- to recognize (extended) JSON content, including MongoDB shell extensions
- - added IsHTMLContentTypeTextual() function, and modified ExistsIniNameValue()
- - added ShortStringToAnsi7String() and UpperCopyWin255() functions
- - added IsEqualGUID/IsNullGuid/GUIDToText/GUIDToRawUTF8/GUIDToString functions
- - added AddGUID/RandomGUID/TextToGUID/RawUTF8ToGUID/StringToGUID functions
- - added TDynArray.ElemPtr() low-level method
- - let TDynArray.LoadFrom() accept Win32/Win64 cross platform binary content
- - new TDynArray.CopyFrom() method and associated procedure DynArrayCopy()
- - TDynArray will now recognize variant/interface fields
- - new TDynArray.FastLocateSorted FastAddSorted FastLocateOrAddSorted methods
- - new TPendingTaskList class, for storing e.g. a time-ordered list of tasks
- - code refactoring of TTextWriter to simplify flushing mechanism, and
- allow internal buffer auto-grow if it was found out to be too small (see
- FlushToStream / FlushFinal methods and FlushToStreamNoAutoResize property)
- - fixed ticket [5bd9df5979] about TTextWriter.CancelAll issue
- - added optional internal buffer size for TTextWriter.CreateOwnedStream()
- - added new constructor TTextWriter.CreateOwnedFileStream()
- - added TTextWriter.LastChar and TTextWriter.AddStrings() methods
- - added TTextWriter.ForceContent method
- - added faster TTextWriter.SetText() method in conjuction to Text function
- - added TTextWriter.Add(const guid: TGUID) and Add(Value: boolean) methods
- - TTextWriter.Add(Format..) will now ignore any character afer |, i.e. |$ = $
- - added TTextWriter.AddQuotedStr() and AddStringCopy() methods
- - added TTextWriter.AddVoidRecordJSON() method
- - added TTextWriter.AddJSONEscapeAnsiString() method
- - added TTextWriter.AddAnyAnsiString() method and AnyAnsiToUTF8() function
- - added TTextWriter.EndOfLineCRLF property
- - for Delphi 2010 and up, RecordSaveJSON/RecordLoadJSON will use enhanced RTTI
- - before Delphi 2010, you can specify the record layout as text to
- TTextWriter.RegisterCustomJSONSerializerFromText() for JSON serialization
- - added TTextWriter.RegisterCustomJSONSerializerSetOptions() for [da22968223]
- - added TTextWriter.AddDynArrayJSON() overloaded method and new functions
- DynArrayLoadJSON() and DynArraySaveJSON() to be used e.g. for custom
- record JSON serialization, using TDynArrayJSONCustomReader/Writer
- callbacks and/or RegisterCustomJSONSerializerFromText(), or enhanced RTTI
- - added TTextWriter.AddDynArrayJSONAsString method, and moved
- TTextWriter.WriteObjectAsString from TJSONSerializer
- - added TTextWriter.UnRegisterCustomJSONSerializer() method
- - added TTextWriter.RegisterCustomJSONSerializerFromTextSimpleType() method
- - added TTextWriter.AddTypedJSON() and AddCRAndIdent methods
- - added TTextWriter.SetDefaultJSONClass to force TJSONSerializer use
- - added TJSONWriter.EndJSONObject() method, for writing an optional
- ',"rowCount":' field in non expanded mode - used for all JSON creation
- - added TTextWriter.EchoAdd() and EchoRemove() methods
- - added QuickSortIndexedPUTF8Char() and FastFindIndexedPUTF8Char()
- - added overloaded QuickSortInteger() for synchronous sort of two arrays
- - fixed potential critical issue [99fe8a1eba] in SortDynArrayInt64/Cardinal
- - added GetNextItem64() Int64Scan() Int64ScanExists() QuickSortInt64()
- FastFindInt64Sorted() AddInt64() CSVToInt64DynArray() Int64DynArrayToCSV()
- and VariantToInt64() functions (used during TID=Int64 introduction in ORM)
- - added RawUnicodeToUtf8() and UTF8ToSynUnicode() overloaded procedures
- - added HexToChar/HexToCharValid and UrlDecodeNextName(), UrlDecodeNextValue()
- and UrlDecodeNextNameValue() functions
- - added Utf8DecodeToRawUnicodeUI() overloaded function returning text as var
- - added UrlEncodeJsonObject() and new overloaded JSONDecode() function
- - added TRawUTF8DynArrayFrom(const Values: array of RawUTF8) function
- - added overloaded function FindRawUTF8() using array of RawUTF8 parameter
- - added TPropNameList record/object to maintain a stack-based list of names
- - speeed enhancement for TRawUTF8List.Add()
- - new TRawUTF8List.SaveToStream and SaveToFile methods
- - new TRawUTF8List.PopFirst and PopLast methods
- - added optional aOwnObjects parameter to TRawUTF8List.Create() constructor
- - new TRawUTF8List.GetObjectByName() method
- - refactoring of CaseSensitive property for TRawUTF8List / TRawUTF8ListHashed
- - added TRawUTF8List.CaseSensitive property as requested by [806332d296]
- - added TRawUTF8MethodList class (based on TRawUTF8ListHashed)
- - added TRawUTF8ListHashedLocked class (based on TRawUTF8ListHashed)
- - added TPointerClassHash and TPointerClassHashLocked classes (used e.g.
- to store RTTI cache, for T*ObjArray process)
- - added TAutoLocker/IAutoLocker and TLockedDocVariant/ILockedDocVariant types
- - added TAutoFree class, for automatic local variable lifetime management
- - added JSON_CONTENT_TYPE_HEADER and XML_CONTENT_TYPE[_HEADER] constants
- - new DateToSQL() overloaded function with direct Year/Month/Day parameters
- - added Base64MagicDecode(), Base64MagicCheckAndDecode() and SQLToDateTime()
- - added IsEqual(const A,B: TSQLFieldBits): boolean function
- - enhanced FPC/Lazarus Win32/Win64 compilation
- - TDynArrayHashed is now a record with Delphi 2009+, due to a bug in latest
- version of Delphi compiler when using TDynArrayHashed = object(TDynArray)
- - fixed [7658da5529] unexpected hash collision in TDynArrayHashed
- - fixed unexpected GPF in TSynCache.Find() e.g. when cache is disabled
- - handle variant serialization in/from JSON using new VariantLoadJSON(),
- VariantSaveJSON(), VariantSaveJSONLength() functions and corresponding
- TTextWriter.AddVariant() method
- - handle variant serialization in/from our binary custom format, using new
- VariantLoad(), VariantSaveLength() and VariantSave() functions
- - added VariantToUTF8() overloaded functions for fast conversion
- - added VariantToInteger()/VariantToIntegerDef()/VariantToInt64() functions
- for direct process of numerical variants (e.g. array indexes)
- - new RawUTF8ToVariant() and VarRecToVariant() functions
- - new RawByteStringToVariant() and VariantToRawByteString() functions
- - added VariantDynArrayToJSON/JSONToVariantDynArray/ValuesToVariantDynArray()
- - added VariantDynArrayClear() function (faster e.g. for array of TDocVariant)
- - added VariantToInlineValue() and VarRecToInlineValue() functions
- - added VarRecToInt64(), VarRecToDouble() and VarRecAsChar() functions
- - added overloaded Int32ToUTF8() Int64ToStr() Curr64ToStr() ExtendedToStr()
- PointerToHex() UInt32ToUtf8() procedures
- - handle binary serialization of variant via FromVarVariant() procedure and
- TFileBufferWriter.Write() method
- - added ToVarString(), FromVarInt64Value() and FromVarBlob() functions
- - added TFileBufferWriter.WriteVarInt64 and TFileBufferReader.ReadVarInt64
- - added TFileBufferWriter.Write1/Write4/Write8 methods and Tag property
- - new overloaded TFileBufferWriter.Create() constructor able to use a TStream
- class to replace CreateInRawByteStringStream and CreateInMemoryStream methods
- - now TFileBufferReader.Read() allows forward reading when Data=nil
- - added RecordSaveJSON() function which follows TTextWriter.AddRecordJSON() format
- - added SaveJSON() function to handle any kind of complex types from RTTI
- - added TSynNameValue.InitFromIniSection() method and optional default value
- parameter to TSynNameValue.Value()
- - added TSynNameValue.Delete() and SetBlobDataPtr() methods
- - added TSynNameValue.OnAfterAdd callback event
- - added TObjectListLocked class
- - expose all internal Hash*() functions (following TDynArrayHashOne prototype)
- in interface section of the unit
- - added crc32c() function using either optimized unrolled version, or SSE 4.2
- instruction: crc32cfast() is 1.7 GB/s, crc32csse42() is 3.7 GB/s
- - added fnv32() function, slower than kr32, but with less collisions
- - added SynLZCompress/SynLZDecompress functions, using crc32c() for hashing
- - added SymmetricEncrypt() function
- - added GetAllBits() function
- - changed GetBitCSV/SetBitCSV CSV format to use 'first-last,' pattern to
- regroup set bits (reduce storage size e.g. for TSQLAccessRights) - format
- is still compatible with old layout, but will more optimized and readable
- - TSynTableStatement.Create() SQL statement parser will handle optional
- LIMIT [OFFSET] clause (in new Limit/Offset integer properties),
- ORDER BY ... [DESC/ASC] clause (in new OrderByField/OrderByDesc properties),
- GROUP BY ... clause (in GroupByField property), "LIKE", "IN(...)" and
- "IS [NOT] NULL" operators and custom functions in the WHERE clause
- - TSynTableStatement.Where[] is now an array to allow complex WHERE clause
- - TSynTableStatement.Select[] is now an array to allow aggregate functions,
- (e.g. Count,Max or Distinct), column aliases, or simple +/- computation
- - introducing TSQLFieldIndex and TSQLFieldIndexDynArray types and associated
- functions so that TSynTableStatement would store the SELECT column order
- - SQLParamContent() / ExtractInlineParameters() functions moved from mORMot.pas
- (now properly handles SQL null and more than MAX_SQLFIELDS parameters)
- - introducing TSQLParamType / TSQLParamTypeDynArray generic parameters
- - added RemoveCommentsFromJSON() procedure - from MPV proposal
- - added GarbageCollectorFreeAndNil() procedure to handle global variables
- proper finalization to nil - avoid error [8e3073c8c7] and [8546b4af1d] e.g.
- when used as design package in Delphi IDE (for all globals and class VMTs)
- - made GarbageCollectorFree public - may be usefull e.g. with packages
- - added GlobalLock/GlobalUnlock functions, used e.g. for ticket [ea4e8bd544]
- - fixed rouding issue e.g. for ExtendedToString(double(22.99999999999997))
- - fixed potential GPF in TRawUTF8List.SetTextPtr() - ticket [d947b36cf9]
- - fixed potential GPF in function UrlDecodeNeedParameters()
- - fixed ticket [c8a8c71b12] allowing decoding of URI computed by browsers,
- even if they do not follow the RFC 3986 specifications
- - fixed potential GPF in serveral functions, when working with WideString
- (WideString aka OleStr do store their length in bytes, not WideChars)
- - fixed TDynArray.AddArray() method when Count parameter is not specified,
- and introducing TDynArray.AddDynArray() method
- - fixed ticket [ad55566b10] about JSON string escape parsing
- - fixed ticket [cce54e98ca], [388c2768b6] and [355249a9d1] about overflow in
- TTextWriter.AddJSONEscapeW()
- - fixed ticket [a75c0c6759] about TTextWriter.AddNoJSONEscapeW()
- - added TTextWriter.AddHtmlEscape() and TTextWriter.AddXmlEscape() methods
- - new TTextWriter.AddHtmlEscapeWiki() method, supporting wiki-like syntax
- - TTextWriter.AddJSONEscape/AddJSONEscapeW methods speed up
- - fixed ticket [01408fd389] in TRawUTF8List.GetText()
- - fixed ticket [e3ae1005dc] about potential GPF in TRawUTF8List.Delete()
- - fixed ticket [1c940a4437] to avoid negative value in TPrecisionTimer.PerSec,
- in case of incorrect Start/Stop methods sequence
- - implement ticket [e3f9742865] for enhanced JSON in soWriteHumanReadable mode
- - added TPrecisionTimer.ProfileCurrentMethod() and TimeInMicroSec property
- for feature request [1abca090ee]
- - added TLocalPrecisionTimer/ILocalPrecisionTimer to alllocate a local timer
- instance on the stack
- - fixed ticket [815facfe57] in UTF8ILComp()
- - fixed UTF8ToWideChar() functions to always append a WideChar(0) to the end
- of the destination buffer, even if returned length is 0
- - added AnyTextFileToString, AnyTextFileToSynUnicode and AnyTextFileToRawUTF8
- - declared PByteArray, PWordArray, PPointerArray here - see [d6b38a96e6]
- - fixed IdemPChar() in pure pascal to behave like the asm version (i.e.
- if up parameter is nil, will return TRUE)
- - added IdemPCharWithoutWhiteSpace() function
- - confusing-named RoundTo2Digits() function renamed into Trunc2ToDigit()
- - added simple, non banker rounding SimpleRoundTo2Digits() function
- - fixed potential comparison error in TSynTableFieldProperties.SortCompare()
- when sorting UTF8 Field with tfoCaseInsensitive in Options
- - speedup of QuotedStr() function and TDynArrayHashed hashing process
- - added GotoEndOfJSONString() function
- - added GetJSONPropName() and GotoNextJSONPropName() functions, able to
- understand MongoDB extended syntax
- - added JSONArrayCount/JSONObjectPropCount, JsonArayItem and
- JsonObjectItem/JsonObjectByPath/JsonObjectsByPath functions
- - several speedup in GetJSONField() and JSON parsing: it will now expect true,
- false or null to be in lowercase only (as in json.org specifications)
- - fixed function GetJSONField() to properly decode JSON number with exponent
- - added function GetJSONFieldOrObjectOrArray() in unit's interface section
- - function GotoNextJSONField() renamed GotoNextJSONItem(), and fixed to
- handle nested JSON array or objects in addition to string/numbers
- - added GotoEndJSONItem() and GetJSONItemAsRawJSON() functions
- - added function JSONRetrieveIDField() for fast retrieval of a "ID":.. value
- - added function JSONRetrieveStringField() for retrieval of a string field
- name or value from JSON buffer
- - added PtrUIntScanIndex() and UnixTimeToDateTime/DateTimeToUnixTime()
- UnixMSTimeToDateTime/DateTimeToUnixMSTime functions
- - fixed ticket [aff1352239] to identify 9999-12-31 dates as valid
- - added Iso8601ToTimePUTF8Char[Var]() and IntervalTextToDateTime[Var]() functions
- - added DateTimeToIso8601ExpandedPChar() and Iso8601CheckAndDecode() functions
- - added TTimeLogBits.FromUTCTime method and NowUTC / TimeLogNowUTC functions
- - added TTimeLogBits.FromUnixTime/FromUnixMSTime/ToUnixTime/ToUnixMSTime
- - added TTimeLogBits.Year/Month/Day/Hour/Minute/Second functions
- - added GetTickCount64() function, native since Vista, emulated e.g. for XP
- - introducing InterlockedIncrement/IntelrlockedDecrement compatibility functions
- - fixed TTextWriter.RegisterCustomJSONSerializer() method when unregistering
- - fixed TTextWriter.AddFloatStr() method when processing '-.5' input
- - fixed potential random GPF in TTextWriter after Flush - see [577ad95cfd0]
- - added TTextWriter.Add(const Values: array of const) method
- - added JSONToXML() JSONBufferToXML() and TTextWriter.JSONBufferToXML()
- for direct and fast conversion of any JSON into the corresponding <XML>
- - added JSONReformat() JSONBufferReformat() JSONReformatToFile()
- JSONBufferReformatToFile() and TTextWriter.AddJSONReformat()
- for fast conversion into more readable, compact or extended layout
- - fixed potential GPF issue in TMemoryMapText.LoadFromMap()
- - added TMemoryMapText.AddInMemoryLine method to allow runtime appending of
- new lines of text - used e.g. by TSynLogFile for life update of remote logs
- - added TMemoryMapText.SaveToFile() and TMemoryMapText.SaveToStream() methods
- - allow file size of 0 byte in TMemoryMap.Map()
- - introduced TSynInvokeableVariantType.Clear() and Copy() default methods
- - added TSynInvokeableVariantType.CopyByValue() virtual method
- - added TSynInvokeableVariantType.IsOfType() method
- - TSynInvokeableVariantType.SetProperty() will now convert any varOleStr into
- a RawUTF8/varString, and dereference any simple varByRef transmitted values
- so that we could safely use late-binding with any kind of value
- - internal DispInvoke() function speed-up by caching the latest accessed type
- - enabled DispInvoke() function for Delphi XE2 and up (it will also fix the
- regression issue in the new RTL which let the field names be uppercased)
- - several TSynTableFieldProperties speed up, when working with variants
- - removed several compilation hints when assertions are set to off
- - UnCamelCase() functions will now handle capital words and numbers at the
- beginning, middle or end of the text - implements request [d0c8210fae]
- - added TSynBackgroundThreadAbstract class for generic background process, and
- callback-driven TSynBackgroundThreadEvent / TSynBackgroundThreadProcedure /
- TSynBackgroundThreadMethod inherited classes
- - new TSynParallelProcess for parallel processing of indexed information
- - added SetThreadName/SetCurrentThreadName functions for request [6acfd0a3d3]
- - added TSynFPUException class to allow per-method customization of the FPU
- exception mapping: to be used e.g. when mixing code between external
- libraries and Delphi code
- - added new TSynValidateNonVoidText and TSynFilterTruncate classes
- - added Utf8TruncateToUnicodeLength() and Utf8TruncateToLength() functions
- - added MaxAlphaCount, MaxDigitCount, MaxPunctCount, MaxLowerCount and
- MaxUpperCount properties to TSynValidateText class
- - added ResourceToRawByteString and ResourceSynLZToRawByteString functions
- - if DOPATCHTRTL is defined, will enable asm-optimized RecordClear and
- _InitializeRecord functions in replacement to the slower RTL version, and
- patch TObject.CleanupInstance before Delphi 2009 (since TMonitor.Destroy
- is sadly private to System.pas)
- - introducing TSQLVar to define database-oriented values
- used by SynDB, mORMot, mORMotDB and mORMotSQLite3 units (instead of former
- confusing TVarData record, which is now dedicated to variant mapping)
- - moved TSQLDBFieldType from SynDB to SynCommons, and used by TSQLVar and all
- database-related process (i.e. in mORMot and SynDB units)
- - SYNOPSE_FRAMEWORK_VERSION constant will now include a per-commit increasing
- number (generated by SourceCodeRep tool), to specify the exact source state
- and a more complete SYNOPSE_FRAMEWORK_FULLVERSION constant has been added
-
- *)
-
-
- {$I Synopse.inc} // define HASINLINE USETYPEINFO CPU32 CPU64 OWNNORMTOUPPER
-
- interface
-
- uses
- {$ifndef LVCL}
- {$ifndef FPC}
- {$ifndef HASFASTMM4}
- FastMM4,
- {$endif}
- {$endif}
- {$endif}
- {$ifdef MSWINDOWS}
- Windows,
- Messages,
- {$ifndef LVCL}
- Registry,
- {$endif}
- {$else MSWINDOWS}
- {$ifdef KYLIX3}
- Types,
- LibC,
- SynKylix,
- {$endif}
- {$ifdef FPC}
- BaseUnix,
- {$endif}
- {$endif MSWINDOWS}
- Classes,
- {$ifndef LVCL}
- SyncObjs, // for TEvent and TCriticalSection
- Contnrs, // for TObjectList
- {$ifdef HASINLINE}
- Types,
- {$endif}
- {$endif}
- {$ifndef NOVARIANTS}
- Variants,
- {$endif}
- SynLZ, // needed for TSynMapFile .mab format
- SysUtils;
-
-
- const
- /// the corresponding version of the freeware Synopse framework
- // - includes a commit increasing number (generated by SourceCodeRep tool)
- // - a similar constant shall be defined in SynCrtSock.pas
- SYNOPSE_FRAMEWORK_VERSION = {$I SynopseCommit.inc};
-
- /// a text including the version and the main active conditional options
- // - usefull for low-level debugging purpose
- SYNOPSE_FRAMEWORK_FULLVERSION = SYNOPSE_FRAMEWORK_VERSION
- {$ifdef LVCL}+'_LVCL'{$else}
- {$ifdef ENHANCEDRTL}+' ERTL'{$endif}{$endif}
- {$ifdef DOPATCHTRTL}+' PRTL'{$endif}
- {$ifdef INCLUDE_FTS3}+' FTS3'{$endif};
-
-
- { ************ common types used for compatibility between compilers and CPU }
-
- const
- /// internal Code Page for UTF-16 Unicode encoding
- // - used e.g. for Delphi 2009+ UnicodeString=St…