diff options
author | William Wilgus <wilgus.william@gmail.com> | 2022-11-10 09:38:50 -0500 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2022-11-12 06:22:16 -0500 |
commit | c756a8a89d6970090b060a179dcabb93a67d8f21 (patch) | |
tree | 868fa2b1393c512ecfa445688635ada71086dea7 /firmware/include | |
parent | dd1fbd51fc7bb3fa7237b3bc34335e99bef29e35 (diff) | |
download | rockbox-c756a8a89d6970090b060a179dcabb93a67d8f21.tar.gz rockbox-c756a8a89d6970090b060a179dcabb93a67d8f21.zip |
make splash split on control characters
splits on spaces also considers \r\n\f\v\t as mandatory breaks
I'm still working on the strptokspn function
my goal is to use it directly rather than storing the matched char
and modifying the source string with \0 in order to tokenize the output
--Done
Change-Id: I7f378b5b9c4df8f10899b9a55a98950afb3931dc
Diffstat (limited to 'firmware/include')
-rw-r--r-- | firmware/include/strptokspn_r.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/firmware/include/strptokspn_r.h b/firmware/include/strptokspn_r.h new file mode 100644 index 0000000000..d565118190 --- /dev/null +++ b/firmware/include/strptokspn_r.h | |||
@@ -0,0 +1,26 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2022 William Wilgus | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | |||
22 | |||
23 | #ifndef __STRPTOKSPN_R_H__ | ||
24 | #define __STRPTOKSPN_R_H__ | ||
25 | const char *strptokspn_r(const char *ptr, const char *sep, size_t *len, const char **end); | ||
26 | #endif | ||