------------------------- CHANGELOG Versions 0 - 10 ------------------------- This file contains information about changes in the package NALib. These are purely informational and any information found here is not guaranteed to be correct, complete or final. Version 10 (first published 2015-July-1): ============================================== Highlights: - Complete revisit of NAString. Lots of changes. Certain APIs have not been reenabled just yet. Do not upgrade if you rely on certain XML or parse functions. - Complete redesign of memory structure. Added a small runtime system for pool allocation of NAString and NAPointer structs. - naCreateXXX functions are now called naInitXXX functions and do take a pointer as first argument which must be non-null! Creation of such pointers can either be done with malloc, naMalloc, naAlloc, naNew or by providing a pointer to an existing struct. - Added NAQuadTree. A structure storing integer quad trees with arbitrary contents and many callbacks - Added NAPool (yet undocumented) - Added NAStack (yet undocumented) Other things: - Changed all naCreateString methods to naNewString - Renamed naDuplicateList to naCopyList - Removed naAllocNALibStruct - Renamed NAPointerContent to NALValue. Added null-termination and array detection. - NAPointer only works with the Runtime System: Renamed naCreatePointer to naNewPointer - Renamed naAllocateXXX functions to naMallocXXX. Added naFree. - Changed and renamed naAllocNALibStruct to naAlloc. Now unconditional alloc. - naDestroyXXX functions have been removed. Use naFree or free to deallocate. - Added NA_INVALID_MEMORY_INDEX to NAByteArray - String escaping has been removed - Added naGetSystemMemoryPageSize and naGetSystemMemoryPageSizeMask, naAllocatePageAligned and naFreePageAligned, naGetZeroFillSize, naIsByteArrayZeroTerminated - Changed some parameter types of various functions - Removed lots of pedantic warnings - Renamed NA_UNUSED_PARAMETER to NA_UNUSED - Added naMakePosiWithAlignment, naGetRectiEndPos, naGetRectiMaxPos - Changed naGetRectiIndexOfPosi to naGetRectiIndexOfPosiRowFirst and added ColumnFirst and made the return type unsigned - Fixed an awkward error in NAPointer which caused data to be not owned. - Fixed a memory leak in naCreateStringFromFileContents - Altered naAppendString functions to naCreateString functions and fixed some potential memory leaks. - Added euler constant 2.718... - added naIsInfinity Version 9 (first published 2015-April-30): ============================================== Highlights: - Redesigned iteration functions of NAList - Added NAPointerContent, a pointer storing const or mutable data. - Added NAURL. Still very rough, but it's a start. - Made several changes to NAString: naCreateStringWithMutableUTF8Buffer can receive a negative size to define that the string is null-terminated. Deleted naCreateStringWithSize, naGetStringMutableUTF8Pointer and naGetStringMutableChar. Altered naGetStringConstUTF8Pointer and naGetStringConstChar to naGetStringUTF8Pointer and naGetStringChar. Therefore an NAString is now always const after creation. Consequently changed implementations in NABitArray, NAFile, NAString. - NABitArray has been removed from this package. Was way too specific to be in a code collection - NAHeap now stores const or mutable data. A new flag defines if the heap stores backPointers or not. Even faster than before! Other things: - Made NA_API and NA_DEF hidden - Added NA_API and NA_DEF for String and File functions - Added NA_SQRT3 - Simplified NAPointer according using the new NAPointerContent - Added naAllocNALibStruct, an internal macro for simplification and maybe (maybe!) future garbage collection. - Added naNullV functions to nullify vectors. - Added naGetHeapCount, deleted naIsHeapEmpty - Added NA_HAPI, NA_HDEF, NA_HIAPI and NA_HIDEF macros - Added NAUInt, an unsigned integer with 32 or 64 Bits. Changed many functions now accepting or returning an NAUInt instead of an NAInt. Todo: recheck all inputs to not exceed the max value of a signed int where necessary. - Changed naMakePositiveiInSize to return two NAUInt pointers. - Removed NA_DIRECTORY_DELIMITER and added NA_PATH_DELIMITER - Added naParseStringPathComponent, naCreateStringWithBasenameOfFilename, naCreateStringWithSuffixOfFilename - Added NAArray.c implementation file and moved some functions there. - Several implementation changes in NAArray. Added helper function for empty array and Constructor calls. Added naForeachArray. - Added NAMutator function pointer type for interation. - Added naSwap for more base types - Added iterator for NAGrowingSpace. Deleted naGetGrowingSpaceConstElement and naGetGrowingSpaceMutableElement - Added naIsListAtFirst and naIsListAtLast - Added naLocateListIndex. - Re-Added a version macro NA_VERSION - Changed the test.c file. Very small. Just a version printout. Version 8 (first published 2015-February-28): ============================================== Highlights: - Complete reorganization of NAMinMax, NARange, NAPos, NASize and NARect. All is dependent on NAMinMax now and there is a distinction between min-max and start-end. - Continued NAHeap implementation. Removed an awkward error which caused the NAHeap structure to not do its job at all. Now works with multiple key types and both as min and max heap. - Added Constructor callbacks. More to come. Readme file changed. - Reimplemented NAGrowingSpace. It now stores the content in a growing list of NAByteArrays. Advantage: The elements always keep their address. Disadvantage: NAGrowingSpace can no longer be accessed like an array. Will need to implement iteraters sooner or later. Not yet perfect but API fit for the future. - Moved many inline functions of NAByteArray to an implementation file and made them non-inline. Other things: - Changed naAllocate and naCreatePointerWithSize such that negative sizes can be given. If size is negative, the latest Bytes are filled with Null. - Added Constructor to NAGrowingSpace creator. - Changed naNewGrowingSpaceElement. No more indexes. - Removed naAddGrowingSpaceElement, naGetGrowingSpaceConstPointer and naGetGrowingSpaceMutablePointer, naDuplicateGrowingSpace - Added Destructor to NAList destructor - Added naMakeDateTimeWithNALibSecondNumber - Added a cplusplus macro for isnan which is necessary on Mac OS X - Added naMakeRectWithRectAndBorder and naMakeRectiWithRectiAndBorder - Added another check for null terminated strings - Added naCreateStringWithMutableUTF8Buffer - Added naLocateListElement and changed some macros in the file - Remove functions of NAList now return a pointer to the content - Added latest leap second according tu bulletin C 49 - Moved many basic functions to NAMathOperators.h - Renamed IsInside to Inside - Renamed some symbols containing From to With - Removed NA_INVALID_MEMORY_INDEX - Re-entered return instructions after naCrash calls. - Improvement of some comments and some error checks Version 7 (first published 2014-October-6): ============================================== This version contains mostly bugfixes and necessary enhancements. - Corrected an awkward error in NAFile when Writing. Buffer was allocated as a local array. Moved NA_FILE_BUFFER_SIZE to implementation file. - Added naCreateByteMap2DWithRectiCopyingBuffer. Works with empty rects. - Added empty variants with E for naMakeSizeE, naMakeRectE, naMakeSizeiE and naMakeRectiE. Corrected a debug error in naMakeRectiWithRectiAndPosiE. - Added NAMap2D, the same as NAByteMap2D but storing arbitrary objects. Not the full API available yet. - Added naClampByteMap2DToRecti - Renamed naIsPosiInByteMap to naIsPosiInByteMap2D - Added error numbers to NADateTime and naGetDateTimeErrorString - Fixed an error in naCreateByteArrayFromDateTime - naGetMonthNumberWithEnglishAbbreviation now returns -1 on failure. Added naGetMonthNumberFromUTF8CStringLiteral for other input strings - Fixed some memory leaks and logical errors - made some coordinate tests more reliable - Added NABounds4 and NABounds4i - Renamed naIsStringEqualToUTF8Pointer to naEqualStringToUTF8CStringLiteral. Fixed a bug and added naEqualStringToString - Removed NA_LIB_VERSION. There must be a better solution in the future. - Removed all naNull and naOne functions except naNulln. - Added a clang specific macro check in naAllocate - Added NA_NORETURN. naCrash is now a _Noreturn function and crashes deliberately. Reorganized naCrash and successive naError calls. Most return instructions after the naCrash call have been erased. Version 6 (first published 2014-August-25): ============================================== Highlights: - Added Constants of NIST 2010 data. Added year setting as a macro - Altered the Array and ByteArray Extraction functions such that negative values can be used. - Added naDuplicateList - Added naExp10 functions for various types. Other things: - Added naMakePositive and naMakeiPositiveInSize - The latest leap second information has been included - Added naFactorize and naBinom - Added naSwapi - Added NA_SQRTPI2 - Added naCreateArrayWithConstBuffer and naCreateArrayWithMutableBuffer - In naCreateByteArrayWithConstBuffer, the buffer gets deleted immediately, if size is 0 and takeownership is true. - Changed naCreateStringWithUTF8CString to naCreateStringWithUTF8CStringLiteral - Implemented naCreateByteArrayFromDateTime - Various small comment and code layout changes. More and improved comments. - The new website address has been put into the readme file. Version 5 (first published 2014-June-25): ============================================== Highlights: - Added NAHeap. A yet quite incomplete and cumbersome-to-use implementation of a very fast datastructure. Will be re-visited in the future. One of the flags is not working yet. - Added NARectArea - Made const iteration of NAList possible. A little Hack but it works. - Changed naInNorm functions to naInsideNorm - Added NARange, NARangef and NARangei with lots of functions to NARange.h - Redefined the fields of naSize and naSizei to also be valid for negative values. Other things: - Changed naEnhanceByteMap2DAtPosi to return mutable pointer to enhanced byte. - Added naMoveByteMap2DToPosi, naEmptyByteMap2D - Added naSubPos, naSubPosi - Added naMakeRectXXXE for empty rects - Moved Helper functions of single fields of NACoord to NARange.h. Added float. - Added naIsNaNf - Renamed insideEE, IE, EI and II with type suffix - Reorganized the API of NARange.h and NAVectorAlgebra.h - Fixed the parameters of naAlmostInside and alike. The API remains the same. - Recreated the header file dependency. Introduced global incomplete typedefs in the System.h file. - Added some functions to NAGrowingSpace - Renamend NA_F_INT to NA_PRIi and changed it to NOT containt the percent sign. - made naGetArrayCount const. - Added a copying option to naCreateArrayOutOfGrowingSpace - Implemented naGetArrayConstPointer and naGetArrayMutablePointer - Added naGetArraytypeSize and naDecoupleArray - Added NA_INVALID_MEMORY_INDEX to NAByteArray.h - Added ConstContent and MutableContent to NAList. - Added naGetGrowingSpaceConstPointer, naGetGrowingSpaceMutablePointer, naGetGrowingSpaceConstElement and naGetGrowingSpaceMutableElement - Added NADestructor and changed naDestroyXXX and naClearXXX functions of NAArray and NAGrowingSpace. Added a section about destructor callbacks in the readme.txt file. - Added naNewGrowingSpaceElement and internal function naGrowGrowingSpaceByOne. Not happy with the API yet. Might soon be revisited. Version 4 (first published 2014-March-17): ============================================== This version contains mostly beautification and bugfixes. No new structure was introduced. - Revisited the NA_API and related macros. Tried to make it more logically. - Added array-reading and -writing for basic datatypes in NAFile. - Moved the autoflush and newline macros of NAFile.h to the implementation file. Added typed enums to the NAFile- and NAString-API instead. Removed old NANewLine enums formerly found in the NAString.h file. - Moved a macro from NAString.h to its implementation file. - Added NA_UNUSED_PARAMETER macro. Removed some warnings. - Changed naCreateDateTimeFromString and naCreateDateTimeFromPointer to naMakeDateTimeFromString and naMakeDateTimeFromBuffer. Removed first parameter. - The Dollar Sign $ has been removed from the macro identifier to avoid warnings. The new macro names are: NA_NL_UNIX, NA_NL_MAC9, NA_NL_WIN, NA_NL, NA_TAB and NA_F_INT (for the former NA$INT). - More and improved comments. - More debug checks. Removed some to-dos. - Small bugfixes Version 3 (first published 2014-January-8): =========================================== Highlights: - Added NAList, A double-chained list with built-in iteration. Very fast and easy implementation using a sentinel. - Added NACoord.h, a file containing NAPos, NASize and NARect for int and floating point values. - Added NAByteMap2D, a two-dimensional Byte-Field in a specific rect. Not fully tested and feature-complete yet! - Added naCreateStringXMLEncoded, naCreateStringXMLDecoded, naCreateStringEPSEncoded and naCreateStringEPSDecoded. - Added string concatenation functions: naAppendStringWithString, naAppendStringWithChar naAppendStringWithFormat and naAppendStringWithArguments Other things: - Added naGetArrayConstPointer, naGetArrayMutablePointer, naIsArrayEmpty. - Added NA_INT_MIN and NA_INT_MAX for the generic NAInt type. - Added the min and max typecasts back in for all types - Added naIsFileOpen - Added text encoding to NAFile. Though currently only UTF-8 is possible. Consequently, added naSetFileTextEncoding and changed some APIs. - Added macro definition for NA_NAN and changed macro definitions for NA_INFINITY. Added naIsNan function. - Changed prefix of inline functions to a macro which is different whether it is a declaration or a definition. - Declared the visibility of all symbols - Removed some warnings. - Removed the const strings for the system name, endianness and bool type. They are stored in the test file now. - Code beautification and comment enhancements. - Made SystemChar dependent on UNICODE macro on windows. Changed the according converters. Version 2 (first published 2013-September-23): ============================================== Highlights: - Added Vector Algebra types and functions - Added Random Generator functions Other things: - Cleanup of last version: Old code removed, beautification of API - Renamed some parameters to avoid shadow warnings on certain compilers - Lots of comments added and improved - Added angle functions as Math operators - Added two more signed integer encoding macros - Changed tab and newline macros to be printf arguments and moved them to NAString.h. Added native newline macro NA$NL - removed the takeownership flag from naCreatePointerWithConstBuffer and naCreateByteArrayWithConstBuffer - naCpy functions now expect restrict pointers. - Renamed NA_INLINE_API to NA_IAPI to save space. Version 1 (first published 2013-September-23): ============================================== Version 1 was intended to be the first public version. The author managed to reimplement all needed functions to drive 3 selling applications. There are still some important files remaining to be translated but NALib is ready for its debut. Many, many changes have been introduced since version 0. Too many to list them. So here are just the highlights: - Several structs can now store const or non-const data. - Renamed lots of functions and macros to be consistent. - Wrote lots of text in the readme.txt file. - Added NAString struct, a struct storing UTF8-strings and providing useful parsing functions. - Added NAFile struct, a struct handling all sorts of input and output files. - Added NADateTime struct, a struct for dates, times and even timers with nano-second accuracy. - Added NABitArray struct, a struct capable of manipulating an arbitrary large stream of bits. - More debug checks in many files. - More and improved comments in many files. Version 0 (first published 2013-July-09): ========================================= Initial version with very basic functions. You have to start somewhere. - System detection, basic integer types, endianness detection, Error functions - Memory operations including: naSet, naCpy, naNull, naOne, naEqual, naSwap - Endianness conversion methods and struct NAEndiannessConverter - Allocation functions and struct NAPointer: A reference-counting pointer. - struct NAByteArray: Stores a Byte chunk. Can have sub-arrays. - struct NAArray: Stores elements of one size, can have sub-arrays. - Math constants like Pi, E, Square root of 2, ... Physical constants. - Math operators including: naSign, naInv, naSqrt, naCbrt, naAbs, naFloor, naCeil, naRound, naSin, naCos, naTan, naAsin, naAcos, naAtan, naAtan2, naLog, naLog10, naLog2, naExp, naExp2, naPow, naDegToRad, naRadToDeg - struct NAComplex: Complex numbers stored in cartesian format - Range functions including: naMin, naMax, naAlmostZero, naAlmostOne, naAlmost, naInside, naAlmostInside, naInNorm ----------------------- This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to