slibc
string.h
Go to the documentation of this file.
00001 /* Copyright (C) 2011-2012 SBA Research gGmbh
00002 
00003    This file is part of the Slibc Library.
00004 
00005    The Slibc Library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Lesser General Public
00007    License as published by the Free Software Foundation; either
00008    version 2.1 of the License, or (at your option) any later version.
00009 
00010    The Slibc library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Lesser General Public License for more details.
00014 
00015    You should have received a copy of the GNU Lesser General Public
00016    License along with the Slibc Library; if not, see
00017    <http://www.gnu.org/licenses/>.  
00018 */
00023 #include_next <string.h>
00024 
00025 #ifndef SLIBC_STRING_H
00026 #define SLIBC_STRING_H
00027 
00028 // TR 24731-1 is not available if __STDC_WANT_LIB_EXT1__ equals 0
00029 #if (!defined(__STDC_WANT_LIB_EXT1__) || (__STDC_WANT_LIB_EXT1__ != 0))
00030 
00031 #include "./base_.h"
00032 #include "./stddef.h"
00033 #include "./errno.h"
00034 
00035 
00036 SLIBC_BEGIN_DECLS
00037 
00056 
00057 size_t strnlen_s(const char *s, size_t maxsize);
00058 
00059 
00085 
00086 errno_t strcpy_s(char * restrict s1, rsize_t s1max, const char * restrict s2);
00087 
00088 
00110 
00111 errno_t strncpy_s(char * restrict s1, rsize_t s1max, const char * restrict s2, rsize_t n);
00112 
00113 
00136 
00137 errno_t strcat_s(char * restrict s1,
00138                                  rsize_t s1max,
00139                                  const char * restrict s2);
00140 
00141                  
00165  
00166 errno_t strncat_s(char * restrict s1,
00167                                   rsize_t s1max,
00168                                   const char * restrict s2,
00169                                   rsize_t n);
00170 
00171 
00195 
00196 errno_t memcpy_s(void * restrict s1, rsize_t s1max,
00197                                  const void * restrict s2, rsize_t n);
00198 
00199 
00224 
00225 errno_t memmove_s(void *s1, rsize_t s1max,
00226                 const void *s2, rsize_t n);
00227 
00228 
00253 
00254 char *strtok_s(char * restrict s1,
00255         rsize_t * restrict s1max,
00256         const char * restrict delim,
00257         char ** restrict ptr);
00258 
00259 
00280 
00281 errno_t strerror_s(char *s, rsize_t maxsize,
00282                 errno_t errnum);
00283 
00284 
00297 
00298 size_t strerrorlen_s(errno_t errnum);
00299 
00300 SLIBC_END_DECLS
00301 
00302 
00303 #if defined(__cplusplus) && (defined(SLIBC_WANT_TEMPLATES))
00304 # include "./string_templates_.hpp"
00305 #endif
00306 
00307 #endif //#if (!defined(__STDC_WANT_LIB_EXT1__) || (__STDC_WANT_LIB_EXT1__ != 0))
00308 
00309 #endif