From c756a8a89d6970090b060a179dcabb93a67d8f21 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Thu, 10 Nov 2022 09:38:50 -0500 Subject: 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 --- firmware/include/strptokspn_r.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 firmware/include/strptokspn_r.h (limited to 'firmware/include') 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 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (C) 2022 William Wilgus + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ + + +#ifndef __STRPTOKSPN_R_H__ +#define __STRPTOKSPN_R_H__ +const char *strptokspn_r(const char *ptr, const char *sep, size_t *len, const char **end); +#endif -- cgit v1.2.3