-------------------------- CHANGELOG Versions 11 - 20 -------------------------- 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 20 (first published 2018-Jan-13): ============================================== - NAString are pointers again. Use naNewStringXXX and naDelete - Strong simplification of NAMemory.h - NARuntime has now a small garbage collector for temporary malloc pointers. Added NA_GARBAGE_TMP_AUTOCOLLECT_LIMIT in NAConfiguration.h - Added Base64 encoding to NABuffer. - Removed tests. Seroiusly, fuck them. - Corrected an error in naNewStringCUnescaped - Added naParseBufferRemainder and naGetBufferLineNumber - Ensured naming scheme on some NADateTime macros. - Removed variadic output from naError and naCrash. - Added more NA_PRI and NA_SCN macros for 32 and 64 bits. - Renamed many functions with "Current" to "Cur", "Content" to "Data". - Added naRetainRefCount, naRetainSmartPtr and naRetainPointer for completeness and when needed as a callback function. Added naRelease as a macro parallel to naRetain. - NAMemoryCleanup has been removed. Replaced it with NAMutator destructors at some positions. - Redefined NA_NULL with ((void*)0) to make sure it has the correct size. - NA_RUNTIME_TYPE now requires to be defined in implementation file. No more static. Added NA_EXTERN_RUNTIME_TYPE. - naMalloc now does not allow negative numbers anymore. - naMakePtrWithExtraction has been removed. - Added leap second information according to Bulletin C 54 and C55 - Fixed somoe sparse buffer part errors in NABuffer. - Fixed a small error when parsing negative decimals in NAString - Added pointer variants for Get and Foreach in NAArray - Fixed a nasty memory leak in naNewString() - Added a parameter to the shift callback of QuadTree and OctTree - Fixed a small error in list searching - Added String to Float and Double conversion. Roughly. - Added naSetn to set values for a huge array almost like naNulln - Removed more code sanity warnings. - Tons of small corrections or adjustments everywhere. Version 19 (first published 2017-Jun-30): ============================================== Highlights: - All iterators finally implemented with a more pro API. - NABuffer now works with Iterators. - NAQuadTree and NAOctTree have updated iterators too. Lots of changes for a simpler API. The Deserialize and Serialize functions have been discarded. - Speedup of NARuntime. Manages memory pools more intelligently. Detects memory leaks. - Removed all functions using NAListPos. Use NAListIterator instead. Added naMoveListThisToFirst, naMoveListThisToLast, naResetListIterator, naLocateListIterator and naRemoveListContent. - Iterator creation functions have been renamed to MakeXXXAccessor, MakeXXXMutator and MakeXXXModifier. Readme has been written. Other things: - Added naMakeStringCEscaped and naMakeStringCUnescaped. - Implemented Newline setting to NABuffer. Added NA_NL_NATIVE to NASystem - Added several API functions to NAString. - Made Append functions of NAString work. - Added a byteSize to naEqualBufferToData. - Replaced all occurences of head/tail, lead/trail, front/back with start/end and forward/backward. Easier to understand. - Added simple string parsing functions. Corrected Buffer parsing at some points. - Added more comments and descriptions. - Corrected a memory leak in NADeflate - NAPNG can now open PNG files with multiple IDAT chunks. - Added some coordinate make functions allowing empty sizes. - Added bit mask functions in NAValueHelper.h for testing, setting and toggling flags. - Corrected a rare error with NA_TypeInfo when debugging. - Fixed an iteration bug of NAList when using naLocateListContent - Added Pointer Iterator functions for NAStack - Added NA_STRING_ALWAYS_CACHE in NAConfiguration.h - Removed an annoying visibility attribute error under GCC. - Replaced naIsPtrConst with naIsPtrMutable and added naIsPtrModifiable - Made NAArray with NAPtr instead of NASmartPtr - Added naCleanupPtr. Removed all other NAPtr cleanup functions. - Added naRetain macro. Enhanced NA_MEMORY_CLEANUP functions with STD prefix. - Fixed a bug in naEmptyList - Coordinate functions now have more simple constructors like naMakeRectiEmpty or naMakeRectWithRecti. - naCopyn and naNulln now expect NAInt instead of NAUInt - Eliminated most code analysis warnings in debug mode. Version 18 (first published 2017-March-30): ============================================== Highlights: - Added compilation macros into a separate NAConfiguration.h file. - Extended NAGrowingSpace with Pop-functionality, hence making it an infinitely sized Stack. Renamed it to NAStack. Has an iterator too. The previous NAStack has been deleted. - Re-added first tests to the package. Shall be used as example implementations too. - Several adjustments in NAMemory. Added pure C free and C++ delete functions. Removed Memory observation functions. Removed NALValue, NABuf, NAMemoryBlock and NACArray. Added NASmartPtr which is the same as NAPointer but without destructor. Base for NASmartPtr is NARefCount, a central reference counting entity which also stores cleanup information. - Reprogrammed NABuffer again. Way simpler now but more powerful. Serves as the base struct for NAString now. Was able to remove huge portions of legacy code due to that reprogramming. - Reprogrammed NAArray without NAByteArray. It is now simpler but can not have subarrays anymore. Separate NAArrayIterator implemented. Lots of API-changes. - Removed NAByteArray completely. - NAFile is now reference counting. - NAString has been greatly simplified. Is now a POD again. Some functionality is still missing: appending, encoding and decoding are not available for the moment. Other things: - Renamed several functions with base types to u, i, f and d and Arrays to v. - NABufInt has been replaced with NAInt. - Changed the isLeapYear of NADateTimeAttribute to an uint32. - Renamed naGetDateTimeDiff to naGetDateTimeDifference. - Made some .h Files 80 characters wide again. - Added signed integer macros to NASystem to ensure consistency. - Added newest leap second information according to bulletin C 53. - Added NA_PRIx - Added C++14 as a macro - Added naGetRuntimeMemoryPageSize. - Removed NAArray.c - Removed the zero byte termination hints of NAPtr - Removed naInitByteArrayFromFile, naInitByteArrayWithFileContents, naMakeStringFromFile and naMakeStringWithFileContents. - naNewThread, naNewMutex and naNewAlarm now are called naMakeThread, naMakeMutex and naMakeAlarm. - Removed NAByteMap2D and NAMap2D - Removed all "Declaration before implementation" comments - Moved basic character typedefs to NASystem.h Version 17 (first published 2017-January-05): ============================================== Highlights: - Overhaul of coord functions. Lots of renaming and trying to use naming consistently with size, length, pos, min, max, offset, ... Warning: Some functions changed their signature. Especially the Inside tests are now called naContainsXXX and have the parameters switched! - Rewrote the NABuffer struct. Much cleaner now. Future proof. - Rewrote NAList to not include an iterator. There is a new NAListIterator struct which can be attached to a list. - Rewrote NAGrowingSpace to have a separated iterator as well. - Iterators can now be Accessors, Mutators and Modifiers. Other things: - Added naSleepN and made naSleepS using a double. - Changed naIsMutexLocked function and the mutex typedefs. It is a fast but erroneous take on the problematic. But as there is no guarantee that this function returns a meaningful result anyway, it does not matter. Shall only be used in debug code. - Added naMoveListTrailingToLast - Removed isMainThread as it is unreliable and deprecated. - Added scalar Box and Volume methods and naMakeRangeiWithRangeiAndPos - Added naTell to retrieve to position within a file. - Removed the empty warning from naGetListCurXXX. - Renamed naPointerCleanup to naMemoryCleanup. Corrected description and naming of many function using this as a parameter. - Removed the iterator functions of NAGrowingSpace - Renamed NAFunc to NAAccessor and NAMutator. Removed NA_NULLFUNC. - Added naMakeListIteratorModifier aside the Accessor and Mutator. - Added some more debugging checks - Added NAMoney. - Removed some security code sanity check warnings on windows but not all. Version 16 (first published 2016-October-11): ============================================== Highlights: - Moving all implementations into folders, leaving the API alone in the base directory. Moving all inline implementation in separate files in these folders too. - Reprogrammed iteration of NAList - Added NACircularBuffer - Revisited base memory structs. Moved NARuntime into NAMemory. Many changes. Runtime System can now be extended to custom types with NA_RUNTIME_TYPE. Other things: - Corrected the scanf constnats SCNi back to int instead of long. - Added naNulln32 and naNulln64 - Added naMakeRectS, naMakeRectSE, naMakeRectiS and naMakeRectiSE - Heap Shrinking is not performed automatically anymore. Added naShrinkHeapIfNecessary. - Added a flag NA_RUNTIME_USES_MEMORY_POOLS to test the runtime - Added a non-fully functional check if memory gets allocated in the main thread. - Revisited the UI. Better but far from fully functional. - NAPointer now uses the NAPtr struct as its base. Removed naNewPointerConst, renamed naNewPointerMutable to naNewPointer. - Corrected an awkward error in naPointer. The refCount mask was inverted. - Added NANewNullPointer. Renamed naMakePtr to naMakeNullPtr. - Added NA_NULLFUNC - Moved Pointer cleanup to NAMemory.h. Renamed NA_POINTER_CLEANUP_XXX to NA_MEMORY_CLEANUP_XXX. Added NA_MEMORY_CLEANUP_UNDEFINED to prevent errors. - Renamed naClearPtr, naFreePtr, naFreeAlignedPtr and naDeletePtr. - Ditched NATypeDestructor in favor of NAFunc. - Changed NAPNG implementation to use New and Delete. - Moved inlineable code of NADateTime into new inline file. - Updated the readme-file. - Enhanced documentation. Version 15 (first published 2016-July-17): ============================================== - Added NA_FILESIZE_BITS and NA_FILESIZE_MAX to NAFile.h - Removed several warnings under VS Community 2015 - Removed the typecasts of the integer limits in NASystem.h - Latest leap second according to Bulletin C 52 - Cleanup of NAPointer. Added NA_POINTER_DELETE_FLAG to ensure nobody deletes an NAPointer directly. - Removed naIsIntStrictlyPositive, naIsIntZero, naIsIntNegative - naMallocIfNull has been erased. - Made naError and naCrash accept variadic arguments. - Added macros NA_CPP98 and NA_CPP11 and corrected many typedefs and defines in NASystem.h - Added NA_ENDIANNESS_HOST which is the same as NA_ENDIANNESS_NATIVE - Renumbered the system macros such that NA_SYSTEM_UNKNOWN is 0. - Finally removed the code sanity warning with naDecoupleString - Added a default clause in NADateTime to prevent warnings. - Moved inclusion of stdarg.h to NASystem to reduce warnings on some systems. - Greatly enhanced the comments. - Made small adjustments in NAFile.h like renamed naJumpFileRelative to naSeekFileRelative. - Added naGetCwd and naMakeStringWithCurWorkingDirectory - Added NA_SCNi, NA_SCNu and naScanDecimal; - Made NABuf 64Bit always - Changed NAQuadTreeNodeDestructor to NAQuadTreeNodeDeallocator. Same with Oct. Version 14 (first published 2016-January-28): ============================================== Highlights: - Added NADeflate, an implementation of the RFC 1951 deflate decompression algorithm. - Added NAPNG, a structure, able to read PNG files. The most important ones for now. Not fully supported and might still have memory leaks! - Introducing NABuffer, replacing all NAFile reading and writing. NAFile is now just a low level descriptor replacement. - Added iterator for NAByteArray and NAArray. - Collected all helper functions in a new file: NAValueHelper.h - Added another base memory struct: NABuf, a memory block with a used count. - Added CRC and Adler Checksum to NABinaryData. - Reimplemented NAPointer to store pointers instead of structs. Way easier now and is now able to add reference counting to any pointer. But requires double dereferenciation. Other things: - Added naMakeMaxWithEndi32, naMakeMaxWithEndi64, naMakeEndWithMaxi32 and naMakeEndWithMaxi64 - Corrected naMakeStringWithBasenameOfFilename. - Added naIsValueInRange functions - Added NA_UINT_MAX - Removed some warnings. - Fixed a very dangerous bug in NAByteArray which could have lead to serious problems and which would not have been easy to debug. - Added clear functions for all base memory structs - Added naGetListPosition, naGetListPositionNext and naGetListPositionPrev. - Tried to change iterator functions to return a boolean and return the pointer in a parameter. But this failed and had been reversed again. Comments added. - Added some warnings in NAList because Null pointers should not be added. - Changes in NADateTime according to Leap second Bulletin C 51. Fixed the leap second macro for January 2016. - Renamed Prime number constants - Replaced naMakeDateTimeFromPointer with naMakeDateTimeFromBuffer. Added binary NADateTime format NA_DATETIME_FORMAT_PNG. - Added 8 and 16 Bit implementations for naSigni, naMini and naMaxi. Added inline implementation of naAbsi. - Revisited and perfected some NAMemory structs. - NAMemoryBlocks can now store 0 bytes. Implementation of NAByteArray now much simpler. - NAByteArray now stores an NAPointer even if it is empty. - Added naNewPointer() which creates a reference to a NULL pointer - Renamed naFill8 to naFill8WithBytes and naEqual8 to naEqual8WithBytes. Warning: the old API names of naEqual have new meaning now: Compares two pointers, instead of a pointer with bytes. Newly added. - Added NA_ENDIANNESS_NETWORK which is the same as NA_ENDIANNESS_BIG - NAFile.c has been deleted. All implementations inline in NAFile.h - Corrected some index debug checks - Added naGetByteArrayMaxIndex; - Added naVoidMemoryBlock, naGetMemoryBlockMaxIndex and some more debug checks in NAMemory.h - Added new buffer flushing behaviour: AUTO and NONE. - Enhanced NAPointer to allow NABuf to be stored as a base memory struct. - Enhanded base memory structs with clear function. Enhanced the readme. - Exchanged Endianness Unknown and Native such that unknown is now zero. - naInitByteArrayWithFileContents returns NULL, when file not opened. Version 13 (first published 2015-November-26): ============================================== Highlights: - Added user interface in NAUI. Very rudimentary just usable for one OpenGL view. But you have to start somewhere. - Added threading NAThreading.h - List elements can now be quickly transfered from one list to anoter. Added NAListPos to quickly locate list elements. Get the pos when adding new elements and use it in naLocateListPos and naMoveListXXX. Other things: - Added memory observation functions for debugging. - Added slow methods naIsSizeiEmptySlow, naIsRectiEmptySlow, naIsVolumeiEmptySlow, naIsBoxiEmptySlow. Refined some debug checks - NABool is now typedef'd as NAUInt instead of int. Removed some warnings. - Found some serious bugs with aligned allocations in earlier versions of Mac OS X. Changed naFreePageAligned to naFreeAligned and reprogrammed a workaround. - Added naExchangeListParts - Added naAdjustOctTreeRoot and naAdjustQuadTreeRoot. The tree now adjusts its root automatically, when it has only one child node. - Revisited the readme file - Added NAFunc, a general calling function type - Removed NAConstructor. - Removed NADestructor in NAArray and NAList. - Renamed NADestructor to NATypeDestructor and only use it in NARuntime. - Removed NAStructInfo. This was an unused relict of the time of implementing NARuntime. - Moved the naSleep functions to NAThreading.h - Removed many implicit conversions from NAVectorAlgebra.h - Made it compile under VisualStudio again. - Added NA_ZERO_DEGREES to the math constants - Moved slow and helper functions of NAList.h to NAList.c - Changed the C11 macro of NA_NULL to NULL. - Added File access methode naAccess - Renamed Scale and componentwise div functions in NAVectorAlgebra to MulComp and DivComp. Added componentwise multiplication and division of Matrices. Added InvComp for vectors and matrices. - Renamed matrix inversion to naInvXXX - Added Determinant computation and Matrix equality tests in NAVectorAlgebra.h - Fixed some type conversion and equal pointer bugs in NAVectorAlgebra.h - Fixed some erroneous checks in NAVectorAlgebra.h - Added float versions of rotation matrix functions Version 12 (first published 2015-August-30): ============================================== - Complete reorganization of base memory structs: Three new structs are introduced: NACArray, NAMemoryBlock and NAPtr. The NAPtr is the same as NALValue before, NALValue is now something different. In total, there are now four structs which corresponds to four combinations of having a byteSize and typeSize available per pointer or not. The NAPointer struct distinguishes between all of them. NAPointer now much bigger and stores flags separate from refCount. - NAGrowingSpace now grows exponentially. Slight changes to API. Simplified whole implementation and made it inline again. NAGrowingSpace.c is removed. - Greatly enhanced NAVectorAlgebra.h to have many more checks, E and S variants and more documentation. The API has beed changed for double-vectors and double-matrices. The now need the type ending d. Slightly changed semantics for naNormalize and naOrthogonalize and some matrix functions. Corrected Bug in naOrthonormalize. - NAHeap now shrinks and grows automatically, if desired. - Fully implemented NAPool. - QuadTree and OctTree Allocators and Deallocators now have a userData param. Warning: Not located at the last parameter! - NAList now uses the runtime with NAListElement - Added naGetHeapMaxCount - Added naTransposeMXX functions for transposing matrices. Added RowFirst and ColumnFirst for Matrix filling - Added naIsListEmpty - Removed constructor and destructor from NAGrowingSpace. Removed naInitArrayWithGrowingSpace. - NAPointer can now be constructed with either NAPtr, NALValue, NAMemoryBlock or NACArray. - Added iteration functions for NAByteArray but commented it out later again. - Added Array iteration for NAGrowingSpace - Renamed NA_INVALID_INDEX to NA_INVALID_MEMORY_INDEX, added NA_INVALID_MEMORY_SIZE and moved them to NAMemory.h - Added more checks in NAMemory.h - Renamed naMakePositiveiInSize to naMakeIntegerRangePositiveInLength and moved it to NAMathOperators.h - Improved documentation in some files - Renamed the Changelog files to reflect the Versions contained. Version 11 (first published 2015-August-16): ============================================== Highlights: - Added CODATA 2014 from NIST for physical constants - Added Leap Second entry according to bulletin C 50 - Added third dimension to NACoord.h: NAVertex, NAVolume and NABox. Moved NARange to the same file. Consequently, generalizing some APIs. - Greatly documented NAQuadTree and changed implementation to be non-redundant. Some API changes introduced. - Added NAOctTree - Renamed all naCpyXXX to naCopyXXX. Renamed all naSetXXX to naFillXXX which are not state machine functions. - Changed all NAVecXXX and NAMatXXX parameters to their direct pointer equivalent. For example NAVec3f now is typed float* - Added Quaternion 3D rotations in naFillM33WithRotationAlongAxis and naFillM33WithRotationAngles in NAVectorAlgebra.h Other things: - Added macro check for c++ standard keyword detection. - Changed count value of NAList to NAUInt - Added another macro check for va_copy - Moved NAPointer to NARuntime.h, renamed NAPointer.h to NAMemory.h - Added intersection functions to naCoord.h - Added Iteration for naQuadTree and naOctTree. Removed obsolete GrowingSpace functions consequently. Iteration is way faster! - Removed naFillRangeXXX, naInsideRange and naAlmostInsideRange functions. - Removed NARectArea.h, NARectArea.c, NAMinMax.h, NAMinMax.c and NARange.h Consequently, moved some functions elsewhere or deleted them. - NAByteMap.h and NAMap2D.h are not deleted yet. We'll see how these files turn out in the near future. - Added NA_ZERO, NA_ONE, naIsIntStrictlyPositive, naIsIntZero, naIsIntNegative - Macro check for Bytes being 8 bits wide moved to NASystem.h - Changed NA_SYMBOL_VISIBLE and NA_SYMBOL_HIDDEN to NA_LINKER_EXPORT and NA_LINKER_NO_EXPORT - Removed naNewPointerStruct. Moved code directly to the other constructors. - Removed naGetPointerLValue. - Replaced naNewPointerWithConstBuffer and naNewPointerWithMutableBuffer with naNewPointerWithLValue. - Changed naFillLValueXXX functions to naMakeLValueXXX - Added more C-standard macros and made many definitions dependent on that. - Made some benchmarks and therefore added a custom pool size instead of relying on the memory page size. Added NA_POOL_SIZE_EQUALS_PAGESIZE and NA_CUSTOM_POOL_SIZE. - Removed string encoding. NALib currently is only capable to handle UTF-8. It is just too much to rewrite all encodings from scratch. For now. - Added naLog2i - NAQuadTree now expands in 4 cycles such that a tree will always be the same no matter how he is constructed. - naSeedRand now returns the seed created when using 0 Version 10 (first published 2015-July-1): ============================================== This changelog file starts with NALib version 10. A full changelog of version 10 and earlier versions are described in other files. Here, only a recapitulation of the most important things of NALib is described: NALib is a source code collection provided with a very open license for everyone to use. It is a pure C library which has been derived from a private C++ library more than a decade in the making. NALib provides code for various data formats and algorithms commonly used every day in a software engineers work. It compiles with clang and gcc on Mac OS X as well as with Visual-C on Windows. Other systems may or may not be supported. The collection has been used to drive several commercial applications on Mac and Windows. During the first 10 version iterations, continuous improvements have been made in order to simplify the API, add code safety, provide debugging helpers and to enhance the collection. From the start, the documentation of NALib was embedded withing the source files, mainly the header files. The documentation is supposed to be didactical for people to understand what is going on in the code and which API should be used under what circumstances. ----------------------- 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