diff options
Diffstat (limited to 'firmware/include')
-rw-r--r-- | firmware/include/string-extra.h | 1 | ||||
-rw-r--r-- | firmware/include/strmemccpy.h | 32 |
2 files changed, 33 insertions, 0 deletions
diff --git a/firmware/include/string-extra.h b/firmware/include/string-extra.h index 549a018dfc..a9b34661a7 100644 --- a/firmware/include/string-extra.h +++ b/firmware/include/string-extra.h | |||
@@ -25,6 +25,7 @@ | |||
25 | #include "strlcat.h" | 25 | #include "strlcat.h" |
26 | #include "strcasecmp.h" | 26 | #include "strcasecmp.h" |
27 | #include "strcasestr.h" | 27 | #include "strcasestr.h" |
28 | #include "strmemccpy.h" | ||
28 | #include "strtok_r.h" | 29 | #include "strtok_r.h" |
29 | #include "memset16.h" | 30 | #include "memset16.h" |
30 | 31 | ||
diff --git a/firmware/include/strmemccpy.h b/firmware/include/strmemccpy.h new file mode 100644 index 0000000000..c7004610dd --- /dev/null +++ b/firmware/include/strmemccpy.h | |||
@@ -0,0 +1,32 @@ | |||
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 __STRMEMCCPY_H__ | ||
24 | #define __STRMEMCCPY_H__ | ||
25 | /* copies src to a buffer of len bytes stopping after | ||
26 | * len or the first NULL (\0) in src | ||
27 | * NULL terminates except when len = 0 | ||
28 | * If len was exceeded NULL is returned otherwise returns | ||
29 | * a pointer to the first byte following the NULL in dst. | ||
30 | */ | ||
31 | char * strmemccpy(char *dst, const char *src, size_t len); | ||
32 | #endif | ||