summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util/zippath.cpp
Commit message (Collapse)AuthorAgeFilesLines
* corefile.h: Move filename utilities to path.h AJR2022-09-251-0/+1
|
* util/zippath.cpp: Removed a now-unnecessary cast to std::string. (#10112) npwoods2022-07-211-1/+1
|
* Treat WinImage compressed disk images (*.imz) as ZIP archives. [Justin Kerk] Justin Kerk2022-02-051-1/+1
|
* util/zippath.cpp: Fixed two issues affecting Windows: Vas Crabb2021-10-061-6/+9
| | | | | * Browsing from a location inside an archive causes MAME to hang. * Files inside archives are not listed.
* util/zippath.cpp: Made behaviour of trying to open things inside archives a ↵ Vas Crabb2021-10-061-12/+24
| | | | bit more consistent, fixed another bug with root paths.
* Filesystem-related bug fixes AJR2021-09-081-1/+1
| | | | | - Fix recently-introduced path-trashing bug in zippath_resolve - Prevent UI file select menu from crashing in error cases where no files can be found
* -ui: Made zoom controls a bit more intuitive. Vas Crabb2021-09-061-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * The UI controls are described as zoom in/out, but they had the opposite effect on the palette and tile viewers. That has been changed to make them consistent with the tilemap viewer. * Made the default zoom key not act as a toggle. People are familiar with the function of Ctrl+0/=/- in web browsers, so making them behave similarly in MAME should make it more approachable. Also added the default zoom key to the relevant documentation page. * Implemented the default zoom key for the palette and tile viewers. * In the tilemap viewer, if the view is in default expand to fit mode, zoom in/out starting from the actual zoom ratio. Once again, this behaves more like the zoom controls in a web browser displaying an image so it should be more intuitive. * Made more messages from the tilemap viewer localisable. -util/zippath.cpp: Fixed MT08074. * There were multiple issues at play here. After #8443 was applied, is_root was simply never returning true on Windows, as OSD_WINDOWS isn't actually defined outside libosd and libocore. This caused phantom parent items to appear in disk roots on Windows, but it meant that the check in zippath_resolve would always fail so the trailing backslash would be trimmed. Fixing the macro test in is_root meant the trailing backslash from C:\ would no longer be trimmed, which caused the stat in zippath_resolve to fail. -bigbord2.cpp: Hooked up floppy DRQ that had somehow got lost. -Reduced tag map lookups in several drivers and devices. -util/coretmpl.h: Removed an overload of bitswap that can be avoided using if constexpr. -Added doxygen comments to some classes, and fixed several doxygen warnings. -util, osd: Test for _WIN32 rather than WIN32. * In C++17 mode, WIN32 is no longer a predefined macro, although various things in 3rdparty define it to maintain legacy support. We're better off moving forward anyway for when WIN32 disappears entirely. (WIN32 is not a reserved name, while _WIN32 is, starting with an underscore follwed by an uppercase letter.)
* Merge tag 'mame0235' into mainline-master Vas Crabb2021-08-271-1/+4
|\ | | | | | | MAME 0.235
| * util/zippath.cpp: OSD_WINDOWS isn't a safe way to detect Windows target, and ↵ Vas Crabb2021-08-261-1/+4
| | | | | | | | OSD_* macros must not be used outside libocore/libosd.
* | formats, osd, util: Started refactoring file I/O stuff. (#8456) Vas Crabb2021-08-221-94/+55
|/ | | | | | | | | 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.
* sdl ui: fix choosing the root path (#8443) tim lindner2021-08-141-7/+13
|
* Much more core std::string_view modernization AJR2021-01-201-19/+5
| | | | | | | | | | | | | | | - Remove corestr.h from emu.h; update a few source files to not use it at all - Change strtrimspace, strtrimrightspace and core_filename_extract_* to be pure functions taking a std::string_view by value and returning the same type - Change strmakeupper and strmakelower to be pure functions taking a std::string_view and constructing a std::string - Remove the string-modifying version of zippath_parent - Change tag-based lookup functions in device_t to take std::string_view instead of const std::string & or const char * - Remove the subdevice tag cache from device_t (since device finders are now recommended) and replace it with a map covering directly owned subdevices only - Move the working directory setup method out of device_image_interface (only the UI seems to actually use the full version of this) - Change output_manager to use std::string_view for output name arguments - Change core_options to accept std::string_view for most name and value arguments (return values are still C strings for now) - Change miscellaneous other functions to accept std::string_view arguments - Remove a few string accessor macros from romload.h - Remove many unnecessary c_str() calls from logging/error messages
* zippath.cpp: Checkpoint #2 AJR2021-01-081-32/+12
| | | | | - Fix unintialized variable issue in zippath_resolve - Eliminate one internal helper function
* util/zippath.cpp: Fix suffix for zip archives. Vas Crabb2021-01-081-1/+1
|
* zippath.cpp: Checkpoint AJR2021-01-061-89/+39
| | | | | - Adopt std::string_view as the input parameter type for most functions. (This necessitates some explicit copying to std::string since other APIs have not been updated yet.) - Remove zippath_parent_basename, whose implementation was utterly broken and fortunately unused.
* Low-level #include overhaul AJR2021-01-021-1/+0
| | | | | | | - 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/+10
|
* fixed some modernize-use-equals-default clang-tidy warnings (nw) (#6237) Oliver Stöneberg2020-01-301-10/+0
|
* Merge pull request #6195 from firewave/includes R. Belmont2020-01-221-1/+1
|\ | | | | use C++ library includes (nw)
| * use C++ library includes (nw) firewave2020-01-221-1/+1
| |
* | fixed some clang-tidy warnings (nw) (#6197) Oliver Stöneberg2020-01-221-1/+1
|/ | | | | | | | | | | | | | * fixed some bugprone-throw-keyword-missing clang-tidy warnings (nw) * fixed some modernize-use-nullptr clang-tidy warnings (nw) * fixed some readability-delete-null-pointer clang-tidy warnings (nw) * fixed some performance-faster-string-find clang-tidy warnings (nw) * fixed some performance-for-range-copy clang-tidy warnings (nw) * fixed some readability-redundant-string-cstr clang-tidy warnings (nw)
* Use canonical spelling of "canonical" (nw) AJR2019-08-021-1/+1
|
* Convert zippath directory to a C++ interface Vas Crabb2018-01-101-719/+533
|
* more TRUE/FALSE cleanup (nw) Miodrag Milanovic2016-10-221-3/+3
|
* NOTICE (TYPE NAME CONSOLIDATION) Miodrag Milanovic2016-10-221-2/+2
| | | | | Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8 also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
* Another correction Nathan Woods2016-07-291-2/+2
|
* Third time is a charm :-) Nathan Woods2016-07-291-9/+9
|
* Better use of std::string::size_type and other cleanups Nathan Woods2016-07-291-6/+6
|
* Converted a number of zippath calls that took 'const char *' to std::string Nathan Woods2016-07-291-22/+22
|
* Cleanups and version bump Miodrag Milanovic2016-07-271-37/+37
|
* As per Vas Crabb, readding overloads that take a std::string& parameter for ↵ Nathan Woods2016-07-041-6/+43
| | | | the result
* Changed a few zippath related functions to return their strings as a return ↵ Nathan Woods2016-07-031-8/+9
| | | | value, as opposed to passing in a destination buffer
* Changed zippath.[cpp|h] to use C++-style comments Nathan Woods2016-07-031-73/+73
|
* Supply modified time for files in archives [Vas Crabb] Vas Crabb2016-06-251-3/+7
|
* POSIX implementation for new directory read features, cleanup of Windows ↵ Vas Crabb2016-06-251-4/+4
| | | | implementation, return directory handle as smart pointer, fix full build [Vas Crabb]
* Changed osd_stat() to return std::unique_ptr<osd::directory::entry> Nathan Woods2016-06-241-1/+1
|
* C++-ified osd_directory (now osd::directory), and added last_modified to ↵ Nathan Woods2016-06-241-32/+32
| | | | osd::directory::entry
* foobar is not a subdirectory of foo called bar Vas Crabb2016-04-101-6/+10
|
* STL makes life easier Vas Crabb2016-04-101-35/+18
|
* Fix for archives containing directories like foobar following foo Vas Crabb2016-04-101-3/+4
|
* Fix phantom files in archives containing directories Vas Crabb2016-04-101-18/+12
|
* Cleanups and version bump Miodrag Milanovic2016-03-301-2/+1
|
* Fix zippath browsing and allow zippath to browse/load 7zip Vas Crabb2016-03-181-147/+106
| | | | This code is still horrible and needs rewriting, but not tonight
* Fold some redundant code Vas Crabb2016-03-181-20/+13
|
* * Remove confusing method from vectorstreams that hide base_ios method ↵ Vas Crabb2016-03-181-52/+51
| | | | | | | | | | | | | (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-90/+85
| | | | | | | | | | | | | | | 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
* Turn core_file into a proper class that gets cleaned up safely using unique_ptr Vas Crabb2016-03-061-6/+6
| | | | Subverted somewhat by chd_file class
* clang-modernize part 1 (nw) Miodrag Milanovic2015-12-031-52/+52
|
* Rename *.c -> *.cpp in our source (nw) Miodrag Milanovic2015-11-081-0/+1101