* Placed C++ extern "C" blocks inside include guards.
* Added a "clean_all" rule to the Makefile to avoid recompiling libusbhsfs after each time "clean" is used.
* Added static asserts for all structs that may need it throughout the code.
* Preprocessor macros are now used to generate certificate and ticket structs.
* Added functions to deal with title info and application metadata reallocations, greatly reducing the number of references to realloc() throughout the code.
* Tweaked gamecardGetHashFileSystemContext() to not return a pointer to a dynamic context.
* Added a type field to Hash FS contexts.
* Renamed titleRetrieveContentMetaKeysFromDatabase() to titleGenerateTitleInfoFromStorage().
* Moved linked lists generation from titleRetrieveContentMetaKeysFromDatabase() into its own function: titleUpdateTitleInfoLinkedLists().
* Adjusted orphan title checks. It is now explicitly verified if application metadata is available before treating a title as orphan, instead of checking if the parent user application is available.
* Code cleanup in titleRefreshGameCardTitleInfo().
* titleRefreshGameCardTitleInfo() now attempts to update the application metadata pointer in orphan title entries if new application metadata was retrieved after a gamecard was inserted *and* if the orphan title count is currently non-zero.
* Updated titleRemoveGameCardTitleInfoEntries() to make it use titleUpdateTitleInfoLinkedLists().
* Fixed possible invalid memory accesses using TitleInfo pointers from gamecard titles if the gamecard they belong to is taken out.
* Fixed invalid for loop condition in _titleGetInfoFromStorageByTitleId() if no gamecard titles have been retrieved.
* AES: moved CTR initializing/updating functions here from nca.c.
* BKTR/RomFS/PFS: check if we're dealing with a NCA with titlekey crypto and the titlekey hasn't been retrieved.
* BFTTF: use void pointers for output font data.
* Mem: Only exclude Unmapped/Uo/ThreadLocal/Reserved memory pages if dealing with FS.
* NCA: use content type context pointers inside NCA contexts to manage ContentMeta, ProgramInfo, Nacp and LegalInfo contexts.
* NCA: added 'written' bool elements to patch structs to indicate patch write completion.
* NPDM: remove unnecessary inline functions, generate PFS patch right after changing ACID data, add a pfsWriteEntryPatchToMemoryBuffer wrapper.
* PFS: added PartitionFileSystemFileContext and related functions to deal with NSP headers.
* ProgramInfo: removed unnecessary inline functions.
* Save: added commented code to dump a full system savefile - will probably use it down the road.
* Tik: added support for volatile tickets (thanks to @shchmue and @Whovian9369!), added a rights ID string representation to the Ticket struct, clear Volatile and ELicenseRequired flags in conversions to common tickets.
* Title: added a function to calculate the number of titles (current + siblings) from a TItleInfo block.
* Utils: added a function to generate a dynamically allocated path string using a prefix, a filename and a extension.
* Removed explicit offset checks throughout all the code.
* Codestyle fixes.
* Updated to-do.
* Improved patch and add-on content title ID verification against a base application title ID.
* Implemented linked lists in TitleInfo structs, which make it easier to deal with multiple patches / add-on contents belonging to the same application.
* TitleApplicationMetadata elements are retrieved with titleGetApplicationMetadataEntries() and used by the UI to display title entries. An 'is_system' filter argument is used to determine which kind of metadata should be retrieved. These are ordered by ID (system titles) or alphabetically (user applications) using qsort().
* Added TitleUserApplicationData struct, which is populated when an user application is selected.
* Tweaked titleRefreshGameCardTitleInfo() behaviour a little bit. Now returns true whenever there are title info changes, so the UI can reload the list.
* Temporarily commented out title info logging from titleInitialize().
* Fixed decrypted key retrieval from the NCA key area for patches with titlekey crypto removed.
* Implemented a very small menu to select a title to dump.
Also increased the USB timeout again, since 1 second seems to be too low for gamecard transfers.
Big thanks to Whovian for helping me format that long system title list.