Commit graph

18 commits

Author SHA1 Message Date
libretroadmin c699e47534 Small style nits and plain sense cleanups 2023-08-16 01:14:50 +02:00
libretroadmin bdc398d79f - Safer code - use strlcpy where possible instead of manual character
assignments for strings longer than 2 chars
- Use strlcpy concatenation instead of strlcat
- Make sure that what remains of iteration of the '_len' variable
for manual char assignment
is done in a safer way so mistakes are less possible
2023-06-20 16:33:55 +02:00
LibretroAdmin 7507e20703 Revert "(RJSON) Combine multiple consecutive rjsonwriter_raw calls into one"
This reverts commit 82efa5a3d6.
2022-08-26 14:44:29 +02:00
LibretroAdmin 82efa5a3d6 (RJSON) Combine multiple consecutive rjsonwriter_raw calls into one
- significantly reduces the amount of function calls
2022-08-26 13:55:52 +02:00
LibretroAdmin 94ed25be56
Cleanups (#14296)
- (database_info.c) Optimizations for database_info_build_query_enum() -
 it would call strlcat at the very least 3 times, normally more than that.
 Every strlcat call is at least one or more strlens. Reduce it all down
 to manual string concatenation and one strlcat
- (database_info_build_query_enum) - always NULL terminates string so no need for NULL termination done by callee
* (menu_displaylist) use smaller strings for basename paths, remove one unnecessary string
in menu_displaylist.c function
- (disk_index_file.c) Avoid another trivial string concatenation by doing
it manually after fill_pathname_join_special
- (fill_pathname_join_delim) since fill_pathname_join_delim() now has a return value, use it for 
string concatenation
- (platform_unix) - Use BUFSIZ as size for a buffer in system_property_get
- some other trivial strlcat usage replacements
2022-08-06 18:04:40 +02:00
LibretroAdmin b2634ea588 * Create fill_pathname_join_special - and specify fill_pathname_join
as deprecated.
* Use fill_pathname_join_special in the vast majority of cases where
we can ensure out_path is a new empty string
* Get rid of some extension concatenation with strlcat where encountered
* Some general cleanups with NULL termination of strings that get immediately
passed to strlcpy/strlcpy-adjacent functions
2022-08-04 14:19:38 +02:00
LibretroAdmin e4bff7c12c Move rjsonwriter helper inline functions over to separate file rjson_helpers.h 2022-08-01 17:41:34 +02:00
libretroadmin 34a18f64e8 Don't do NULL termination on string when we pass the string to
strlcpy and/or a file_path function that does strlcpy under the hood
2022-07-23 10:46:05 +02:00
LibretroAdmin 29774f5b7a
Small opts (#14186)
* (joypad_connection) Small optimizations -
* Turn functions static where possible
* Hose strlen call out of loop

* (input_driver.c) General cleanups:
* Some small code/style nits

task_screenshot.c:
* Move widget callback function for screenshots to task_screenshot.c

(file_path.c):
* Turn get_pathname_num_slashes into static function
* path_linked_list_free - always returns true, so get rid of return value
* path_linked_list_new - fix function signature
* path_get_archive_delim - do not NULL-terminate string, already done by strlcpy later on

General:
* Slight optimizations - use int/size_t for loop counter variable instead of unsigned
* Take advantage of fact that strlcpy already NULL-terminates, so don't do this explicitly
outside if we're just going to end up calling strlcpy/fill_pathname_join on it anyway
2022-07-19 10:01:33 +02:00
twinaphex 646cadba8c Another style nit 2021-07-20 05:23:12 +02:00
schellingb ba1ed2da4b New faster json parser/writer library rjson
Replace existing libraries jsonsax_full and jsonsax with it
2020-10-12 03:02:20 +09:00
twinaphex 4ec216dc0b Get rid of file_path_str 2020-08-22 01:06:10 +02:00
twinaphex 3680804217 Undo path_basedir_size 2020-08-04 03:05:20 +02:00
twinaphex 3635bf0d01 Silence some warnings 2020-08-01 18:04:56 +02:00
twinaphex 8656b3d6f8 Create specialized optimized path_basedir_size 2020-07-11 19:29:43 +02:00
twinaphex 31ff7e384f Cleanups 2020-05-24 21:55:41 +02:00
twinaphex 3b207990ce Cleanups 2020-02-23 06:34:41 +01:00
jdgleaver 00397a33f0 (Disk Control Interface) Add support for saving/restoring last used disk in playlists + code overhaul 2020-01-22 17:09:12 +00:00