mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Extend path_append_ex to truncate compname, remove some strmemdupa
remove some duplicated strings previously allocd off the stack just removing string duplications that are easily handled with truncation now available with path_append_ex() this also has an advantage of less stack used in worst case scenarios Change-Id: I3a43e33ef8a8c36599e4c6c036a0ccdd8ed0c883
This commit is contained in:
parent
a7d0ff2000
commit
dbe20d453d
6 changed files with 122 additions and 56 deletions
|
@ -95,7 +95,7 @@ void path_remove_dot_segments(char *dstpath, const char *path);
|
|||
#define PA_SEP_HARD NULL /* separate even if base is empty */
|
||||
#define PA_SEP_SOFT "" /* separate only if base is nonempty */
|
||||
size_t path_append_ex(char *buf, const char *basepath, size_t basepath_max,
|
||||
const char *component, size_t bufsize);
|
||||
const char *component, size_t component_max, size_t bufsize);
|
||||
size_t path_append(char *buffer, const char *basepath, const char *component,
|
||||
size_t bufsize);
|
||||
ssize_t parse_path_component(const char **pathp, const char **namep);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue