76 Commits

Author SHA1 Message Date
jdgleaver
334a43a7c5 Prevent unnecessary extraction (to disk) of compressed content files + task_content.c clean-ups 2021-05-20 17:08:51 +01:00
jdgleaver
5a0dc5524d Fix string_list memory leaks 2020-09-08 14:58:49 +01:00
twinaphex
318ac1f667 (filebrowser_parse) Use non-heap allocated string_list functions 2020-09-04 06:29:30 +02:00
twinaphex
662e37f670 Replace more instances of string_split 2020-08-26 13:35:05 +02:00
twinaphex
f48dc0ff5b Reorder structs, alignment 2020-08-15 20:38:31 +02:00
Bernhard Schelling
b03cdbd0da First set of cleanups to archive handling (Rev B)
- Don't read the entire archive file into memory on systems without HAVE_MMAP
- Support ZIP files between 2GB ~ 4GB on 32bit architectures
- Remove zip exclusive members from `file_archive_transfer`
- Add `zip_context_t` for zip like the already existing `sevenzip_context_t`
- Unify cleanups of zip and 7z in `file_archive_file_backend::archive_parse_file_free`
- Handle some sizes and offsets as int64_t (preparation for future Zip64 support)
- Handle ZIP compression methods in `zlib_stream_decompress_data_to_file_init` not in `file_archive_perform_mode`
- Return progress of 7z iterating with `file_archive_parse_file_progress`
- Uses MMAP where available, for files up to 256MB
2020-07-16 02:47:59 +09:00
twinaphex
06064a0527 Revert "Bring back MMAP support"
This reverts commit 32dcff3880a32521e49916dc56e8b04f56ed6b45.
2020-07-13 23:52:23 +02:00
Bernhard Schelling
32dcff3880 Bring back MMAP support
Will be used where available for files up to 256MB
2020-07-14 03:04:01 +09:00
Bernhard Schelling
c05f1e91fc Fix another memory leak that was there originally
When loading a single file out of a ZIP with many files it leaked memory allocated for all found filenames that weren't requested.
2020-07-14 03:00:47 +09:00
Bernhard Schelling
a978b939ff Fix C89 build 2020-07-14 01:56:48 +09:00
Bernhard Schelling
0ddb073784 First set of cleanups to archive handling
- Don't read the entire archive file into memory on systems without HAVE_MMAP
- Support ZIP files between 2GB ~ 4GB on 32bit architectures
- Remove zip exclusive members from `file_archive_transfer`
- Add `zip_context_t` for zip like the already existing `sevenzip_context_t`
- Unify cleanups of zip and 7z in `file_archive_file_backend::archive_parse_file_free`
- Handle some sizes and offsets as int64_t (preparation for future Zip64 support)
- Handle compression methods in `zlib_stream_decompress_data_to_file_init` not in `file_archive_perform_mode`
- Return progress of 7z iterating with `file_archive_parse_file_progress`
2020-07-12 00:51:35 +09:00
twinaphex
5a0bc479b1 (libretro-common) Avoid more callocs 2020-06-28 20:57:00 +02:00
twinaphex
1ae20ea17c Style nits - turn macro names into upper-case - some while style nits 2020-06-26 20:00:19 +02:00
twinaphex
74b3b505c9 This part of the code looked suspicious and was leaking memory
for one codepath
2020-06-24 18:39:21 +02:00
twinaphex
b9f65af98a (Libretro-common) Sync 2020-06-24 15:05:03 +02:00
twinaphex
cd9ca691ca (libretro-common) Update copyright 2020-01-31 15:43:42 +01:00
twinaphex
efb98a8a01 Cleanup file_archive_get_file_backend 2019-07-20 16:01:56 +02:00
twinaphex
c3c3eedfa2 file_archive_get_file_list - file_archive_walk returns boolean type,
not integer
2019-05-31 07:48:10 +02:00
twinaphex
2b401ce13b (archive_file) Small optimizations - use one strlen less in one instance 2019-04-27 02:39:33 +02:00
twinaphex
1598cc773c More small cleanups 2019-04-26 12:53:12 +02:00
twinaphex
68ab984603 (archive_file) Safe optimizations 2019-04-26 12:46:44 +02:00
twinaphex
aa156bd804 Have to revert this for now 2019-04-26 11:28:08 +02:00
twinaphex
60c028a562 (archive_file) Some optimizations 2019-04-26 10:26:48 +02:00
Brad Parker
16fffd67ea Normalize archive progress calculation 2019-01-16 17:22:46 -05:00
orbea
bfc366decc Squeeze extra blank lines with cat(1).
Example:

find . -type f -iname '*.c' | while read -r i; do
  cat -s "$i" > "$i.new"
  mv "$i.new" "$i"
done
2019-01-08 11:04:58 -08:00
Brad Parker
a1b831abdb allow 7z archives to have multiple files extracted at once 2018-08-06 20:44:59 -04:00
twinaphex
768ebbfdb5 Merge commit 'ce9ce1d35387ef8144e53bf071396fa075bfb6c5' as 'libretro-common' 2018-05-12 17:56:34 +02:00
twinaphex
0548349991 Remove libretro-common 2018-05-12 17:56:14 +02:00
twinaphex
be7eb4de1c Update libretro-common 2018-04-16 08:57:17 +02:00
twinaphex
1751f4a0af Make it possible to read bigger files by replacing ssize_t with int64_t
and size_t with uint64_t
2018-04-13 00:18:11 +02:00
twinaphex
c7c4b723d6 Move path_file_exists to filestream and do away with filestream
dependencies in file/file_path
2017-12-14 20:05:46 +01:00
gblues
6904101c44 Clean up trailing whitespace
== DETAILS

Really simple code cleanup, because my editor flags trailing whitespaces
and it's pretty annoying.
2017-12-12 00:24:18 -08:00
twinaphex
702f1276d6 Silence warnings 2017-10-03 00:53:09 +02:00
twinaphex
6af5bd01bf Merge retro_stat and file_path 2017-06-16 15:00:11 +02:00
twinaphex
e8c1c153d6 Prevent nULL pointer dereference 2017-05-08 22:55:45 +02:00
twinaphex
0c66441d08 (archive_file) Cleanups 2017-04-21 20:46:41 +02:00
Twinaphex
216e7bcdaf Silence more warnings on iOS 2017-02-26 21:46:19 +01:00
Twinaphex
b7b3b2cb5f Try to prevent truckload of warnings on iOS 2017-02-26 10:33:03 +01:00
twinaphex
712724e0ff (archive_file.c) Get rid of memsets 2017-02-20 02:12:39 +01:00
twinaphex
64bb848daf Update headers (pt. 2 - libretro-common) 2017-01-22 13:58:20 +01:00
twinaphex
e328c4ebfa (archive_file.c) Cleanup 2016-12-21 01:47:32 +01:00
twinaphex
3561949a87 Get rid of some implicit memsets 2016-12-19 18:18:40 +01:00
twinaphex
4c9f2e41ff Get rid of some implicit memsets 2016-12-19 14:04:37 +01:00
twinaphex
6935ce902e (archive_file.c) Cleanups/style nits 2016-12-17 17:19:32 +01:00
twinaphex
1ddd0ab1d3 (Statically linked RA) Make 'Open Archive' work when there are
no core info files
2016-12-17 17:12:53 +01:00
twinaphex
39b41a1f51 file_archive_get_file_list - take out HAVE_COMPRESSION code 2016-12-17 11:59:19 +01:00
twinaphex
4fb6808321 libretro-common is MIT and we don't want individual copyright
per authors here; RetroArch is GPL and it's fine there
2016-10-27 19:52:58 +02:00
twinaphex
88e88e92f3 Prevent crash with zipped roms 2016-10-27 19:50:19 +02:00
Brad Parker
d1d5584d18 update copyright 2016-10-27 11:47:10 -04:00
twinaphex
df87fc7043 Cleanups - prevent implicit memsets 2016-10-16 02:00:59 +02:00