Commit Graph

169 Commits

Author SHA1 Message Date
twinaphex
9910dfbee2 Replace strcpy_literal usage of trivial string setting 2021-04-06 11:21:28 +02:00
twinaphex
1296fc4745 use strlcpy_literal for string literal copies 2020-09-19 23:28:01 +02: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
ef51ef1fb1 database_info_list_new - md5 and sha1 need to be freed 2020-06-29 19:27:50 +02:00
twinaphex
6dcc7d5441 Use malloc where possible 2020-06-28 16:11:17 +02:00
twinaphex
de36ff20fb Create string_ends_with_size 2020-06-25 14:38:06 +02:00
twinaphex
091b1c88c2 Optimize database_cursor_iterate 2020-06-08 15:27:08 +02:00
twinaphex
e54e12876b Header cleanups 2020-01-25 17:51:07 +01:00
twinaphex
6dd46e6971 Fix database query regression 2019-09-26 13:37:58 +02:00
twinaphex
b94b9e2adb Go back to plain strlcpy/strlcat - probably best to look at
opportunities to reduce these calls vs. replacing them with
unsafe macros
2019-09-23 00:19:01 +02:00
twinaphex
3b057d9605 Start using STRLCAT_CONST_INCR and STRLCPY_CONST 2019-09-20 23:33:17 +02:00
twinaphex
4c3e0d44b8 Revert "Start using string_is_equal_memcmp and"
This reverts commit 26d6aee1eb.
2019-04-29 04:04:33 +02:00
twinaphex
26d6aee1eb Start using string_is_equal_memcmp and
string_is_equal_memcmp_fast
2019-04-28 17:23:11 +02:00
Brad Parker
c606e8893c null check 2019-02-28 16:56:41 -05:00
Brad Parker
4f0d61a2ac update copyright 2019-02-22 19:13:36 -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
849792dc2c fix memory leaks 2018-08-18 01:15:50 -04:00
twinaphex
6f0fc2426d (database_info/task_database) Get rid of list_special dependencies 2018-04-10 04:13:45 +02:00
twinaphex
86c826350e Start moving dependencies out of certain files 2018-04-09 22:18:25 +02:00
twinaphex
b4ea072ce7 (database_info.c) Cleanups 2018-02-25 21:58:52 +01:00
twinaphex
d6d89e10ba Get rid of msg_hash dependency 2018-02-25 17:48:00 +01:00
twinaphex
fa40be2aa5 Simplify sorting 2018-02-25 17:47:36 +01:00
twinaphex
071476174d database_info.c - get rid of hashes 2018-02-25 17:43:12 +01:00
twinaphex
8d99fd7ce0 Cleanup string manipulation 2018-02-01 11:16:13 +01:00
twinaphex
3564562563 database_info.c - use malloc 2017-09-29 05:01:00 +02:00
twinaphex
e8f39f004e MSVC buildfixes 2017-09-19 21:29:28 +02:00
Twinaphex
ee06a8f175 Merge pull request #5447 from bkoropoff/scanning2
More scanning rework
2017-09-19 15:46:04 +02:00
Aaron Oneal
fb8fe84684 Fix archive scanning
Archive scans were broken for cores like Atari 5200 and Commodore 64 because archive contents were skipped if a core reported it supported compressed files. The problem is, it's a false assumption that just because a core supports compressed files that the content database contains CRCs for compressed files.

Instead of adding the contents of every compressed file to the scan list ahead of time, the patched logic now checks for the CRC of the archive itself as it always has but then adds the archive contents to the scan list if the archive itself is no match. This maintains the logic of adding only the archive if the core supports compressed files and the archive CRC matches but also allows for deeper content scans when there is no match.

The patch also removes `core_info_unsupported_content_path` as it was redundant with existing `core_info_database_supports_content_path` logic.
2017-09-18 23:15:28 -07:00
Brian Koropoff
93d05665c2 database_info: prioritize scanning cue/gdi files
Scan them before the tracks so we can avoid scanning large
files we don't need to.
2017-09-18 09:03:43 -07:00
twinaphex
3860d95c8f Reduce stack usage 2017-09-09 21:41:38 +02:00
Brad Parker
5733d8ebd5 move content list builder into scanner task with progress, fixes menu freeze with large playlists 2017-07-09 00:44:02 -04:00
twinaphex
1cc350bfdb Prevent some implicit memsets 2017-04-20 09:21:08 +02:00
twinaphex
8c89ec158c Update copyrights 2017-03-22 03:09:18 +01: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
0489bc6196 Cleanups 2017-01-23 15:05:11 +01:00
twinaphex
82d894c205 Cleanups 2017-01-23 15:02:29 +01:00
twinaphex
716a409816 (database_info.c) Only do strdup if val_string is not empty 2017-01-10 23:15:26 +01:00
twinaphex
bdc9bf68c6 Cleanups 2017-01-09 02:06:32 +01:00
twinaphex
fac2557885 (database_info.c) Don't use non-enum function 2016-12-20 21:40:41 +01:00
twinaphex
6d285be90c Create database_info_build_query_enum 2016-12-20 21:19:25 +01:00
twinaphex
c8dc0fef0c Cleanups - turn some functions into static functions and move
to task_database.c
2016-12-20 21:08:31 +01:00
twinaphex
39b41a1f51 file_archive_get_file_list - take out HAVE_COMPRESSION code 2016-12-17 11:59:19 +01:00
Brad Parker
7be7568d7d do not try to get an archive list if it is inside another archive 2016-11-28 18:20:01 -05:00
Brad Parker
d1d5584d18 update copyright 2016-10-27 11:47:10 -04:00
twinaphex
6b48c6ee7f (database_info.c) Remove implicit memsets 2016-10-08 18:44:24 +02:00
twinaphex
13cf804a70 Fix signed/unsigned mismatch warnings 2016-09-30 08:23:24 +02:00
twinaphex
1842e35b8d Cleanups 2016-09-29 11:03:59 +02:00
twinaphex
cfe91125db Create database_info_get_current_element_name 2016-09-29 10:59:50 +02:00
twinaphex
7e1639f33b Create database_info_set_type 2016-09-29 10:43:38 +02:00