summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util/unzip.cpp
Commit message (Collapse)AuthorAgeFilesLines
* util/unzip.cpp: Work around spurious maybe uninitialised warning with ↵ Vas Crabb2024-03-251-1/+1
| | | | certain GCC versions.
* util/ioprocs.cpp: Added wrappers for common patterns. (#11608) Vas Crabb2024-02-251-24/+19
| | | | | emu/diimage.h: Removed fread overloads that allocate memory for output. util/core_file.cpp: Changed output size of load to size_t.
* Added Zstandard support for zip archives and CHDs. (#11827) Vas Crabb2023-12-111-2/+93
| | | | | | * 3rdparty/zstd: Added Zstandard compression library version 1.5.5. * util/unzip.cpp: Added support for Zstandard compression (method 93). * util/chdcodec.cpp: Added support for Zstandard compression. * 3rdparty/flac: Always define NDEBUG to avoid log spam.
* avhuff.cpp, cdrom.cpp, msdib.cpp, unzip.cpp, vbiparse.cpp: Use multibyte.h ↵ AJR2023-09-171-19/+6
| | | | functions
* util/unzip.cpp: Update for latest LZMA SDK. Vas Crabb2023-05-041-2/+2
|
* unzip.cpp: Minor logging improvement AJR2023-02-111-1/+1
|
* Fixed a few issues identified by Coverity: Vas Crabb2022-11-061-8/+8
| | | | | | | | | | | | | | | | | * cpu/m6805: Removed unnecessary comparison that can't be true from 'HC05 timer handler. * machine/z80scc.cpp: Fixed flag test in logging. * emu/devdelegate.h: Fixed use-after-move in functoid constructor. * util/unzip.cpp: Fixed integer promotion issue in ZIP16 member header handling. * util/xmlfile.cpp: Got rid of custom allocator functions that have alignment issues and no longer provide value. * capcom/alien.cpp: Use machine().rand() for determinism. * ensoniq/esqpanel.cpp: I/O stream eof() returns whether a read stopped short due to EOF, not whether the file pointer is at EOF. * sega/sms.cpp: Fixed a few use-after-move errors. * osd/modules/monitor: Fixed an apparent bug in what appears to be a setter member function.
* Miscellaneous clean-up. Vas Crabb2021-08-291-21/+21
| | | | | | | | | * play_1.cpp: Use output finders. * s3.cpp, s4.cpp, s6.cpp, s6a.cpp: Use output finders, reduced tag lookups. * taito_z.cpp: Use output finders, split up state class a little. * util/unzip.cpp: Use std::optional to make code clearer. * util/ioprocsfilter.cpp: Work around MSVC DevCom-1516410.
* formats, osd, util: Started refactoring file I/O stuff. (#8456) Vas Crabb2021-08-221-438/+612
| | | | | | | | | Added more modern generic I/O interfaces with implementation backed by stdio, osd_file and core_file, replacing io_generic. Also replaced core_file's build-in zlib compression with a filter. unzip.cpp, un7z.cpp: Added option to supply abstract I/O interface rather than filename. Converted osd_file, core_file, archive_file, chd_file and device_image_interface to use std::error_condition rather than their own error enums. Allow mounting TI-99 RPK from inside archives.
* Low-level #include overhaul AJR2021-01-021-0/+1
| | | | | | | - vecstream.h: Revert changes made in aa29519528cb3dbdbfac56819bea670ed8c56c5d. The std::string_view conversion has been made a non-member function (util::buf_to_string_view) and moved to coretmpl.h. - strformat.h: Remove the using declaration importing util::string_format into the global namespace. It has been moved to emucore.h and a few tool sources; other references have been qualified. - osdcore.h: Split out file, directory and path classes and methods to a new header (osdfile.h), Doxygenizing the documentation comments. - Disaggregate many #includes that were including other standard or custom headers. emu.h now includes basically the same things that it did, but other headers have been streamlined; for instance, emucore.h no longer stealth-includes osdcore.h several ways.
* there are reasons for things being the way they were (nw) Vas Crabb2020-01-311-0/+5
|
* fixed some modernize-use-equals-default clang-tidy warnings (nw) (#6237) Oliver Stöneberg2020-01-301-5/+0
|
* fixed some clang-tidy warnings (nw) (#6236) Oliver Stöneberg2020-01-301-1/+1
| | | | | | | | | | | | | | | | * fixed some modernize-redundant-void-arg clang-tidy warnings (nw) * fixed some modernize-use-bool-literals clang-tidy warnings (nw) * fixed some modernize-use-emplace clang-tidy warnings (nw) * fixed some performance-move-const-arg clang-tidy warnings (nw) * fixed some readability-redundant-control-flow clang-tidy warnings (nw) * fixed some readability-redundant-string-cstr clang-tidy warnings (nw) * fixed some performance-unnecessary-value-param clang-tidy warnings (nw)
* Make osd_printf_* use util/strformat semantics. Vas Crabb2019-09-261-35/+35
| | | | | | | | | | | | | | | | | (nw) This has been a long time coming but it's here at last. It should be easier now that logerror, popmessage and osd_printf_* behave like string_format and stream_format. Remember the differences from printf: * Any object with a stream out operator works with %s * %d, %i, %o, %x, %X, etc. work out the size by magic * No sign extending promotion to int for short/char * No widening/narrowing conversions for characters/strings * Same rules on all platforms, insulated from C runtime library * No format warnings from compiler * Assert in debug builds if number of arguments doesn't match format (nw) Also removed a pile of redundant c_str and string_format, and some workarounds for not being able to portably format 64-bit integers or long long.
* unzip: defer decoding DOS timestamps (nw) Vas Crabb2017-09-111-13/+29
|
* Reverting part of changes from previous commits as described in mail on list ↵ Miodrag Milanovic2016-10-231-9/+9
| | | | (nw)
* there you go (nw) Miodrag Milanovic2016-10-221-1/+1
|
* some bool <-> int not needed conversions, also cleaned drivenum.* was using ↵ Miodrag Milanovic2016-10-211-9/+9
| | | | memset for clearing vector (nw)
* Fixed incorrect implementation of win_time_point_from_filetime() Vas Crabb2016-06-261-42/+2
|\
* | Fix Clang compile on OSX Brad Hughes2016-06-251-1/+1
|/
* clang on windows fixes (nw) Miodrag Milanovic2016-06-251-3/+0
|
* Supply modified time for files in archives [Vas Crabb] Vas Crabb2016-06-251-15/+148
|
* Various cleanups suggested by static analyzer (nw) Miodrag Milanovic2016-04-241-2/+2
|
* Make un7z a bit chattier, too Vas Crabb2016-04-111-0/+4
|
* Make unzip less opaque about what it's doing Vas Crabb2016-04-111-23/+246
|
* Fix crash Vas Crabb2016-04-101-1/+0
|
* Second thoughts about default status Vas Crabb2016-04-101-1/+1
|
* Visual Studio says it can be uninitialized (nw) Miodrag Milanovic2016-04-101-1/+1
|
* foobar is not a subdirectory of foo called bar Vas Crabb2016-04-101-1/+1
|
* Work with more ZIP64 files Vas Crabb2016-04-101-48/+73
|
* zip cleanup Vas Crabb2016-04-101-64/+39
|
* zip method 14 Vas Crabb2016-04-091-2/+135
|
* More ZIP support Vas Crabb2016-04-091-138/+127
|
* ZIP64 support [Vas Crabb] Vas Crabb2016-04-091-170/+353
|
* Make emu_file archive searh order CRC+path, CRC+partial path, CRC, path, ↵ Vas Crabb2016-03-251-13/+27
| | | | partial path and fold some redundant code
* Fix boundary check on parsing ZIP ECD Vas Crabb2016-03-211-1/+1
|
* * Remove confusing method from vectorstreams that hide base_ios method ↵ Vas Crabb2016-03-181-168/+194
| | | | | | | | | | | | | (fixes disassembly view) * Allow std::string to pass through core_file unmolested (reduces temporary allocations) * Make zip/7z instances of same class with uniform interface * zippath browsing is broken at the moment This is another step towards transparent archive support. It's now possible to access zip and 7z archives with the same code. Nothing is taking advantage of it yet. There's now some very similar code in fileio.cpp and clifront.cpp that could be folded at some point.
* Make osd_file a polymorphic class that's held with smart pointers Vas Crabb2016-03-141-377/+417
| | | | | | | | | | | | | | | Make avi_file a class that's held with smart pointers, encapsulate various AVI I/O structures Make zip_file and _7z_file classes rather than having free functions everywhere Hide zip/7z class implementation behind an interface, no longer need to call close() to send back to the cache Don't dump as much crap in global namespace Add solaris PTY implementation Improve variable expansion for SDL OSD - supports ~/$FOO/${BAR} syntax Rearrange stuff so the same things are in file module for all OSDs Move file stuff into its own module 7z/zip open and destruct are still not thread-safe due to lack of interlocks around cache access Directory functions still need to be moved to file module SDL OSD may not initialise WinSock on Windows
* macro removal INLINE -> static inline (nw) Miodrag Milanovic2015-12-121-4/+4
|
* clang-modernize part 1 (nw) Miodrag Milanovic2015-12-031-22/+22
|
* Rename *.c -> *.cpp in our source (nw) Miodrag Milanovic2015-11-081-0/+770