X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=includes%2Fstring.h;h=c0efcaf21738250f937fe97246bea6ee18ff1dca;hb=d7f375a09a9912bb18ad42f1442fbf64311bfed6;hp=599653a384539dd632cb0e0b8ee4a1195f152b97;hpb=70713966ce3d6ef8965458e804fc47e2640ab51f;p=pdclib diff --git a/includes/string.h b/includes/string.h index 599653a..c0efcaf 100644 --- a/includes/string.h +++ b/includes/string.h @@ -1,6 +1,4 @@ -/* $Id$ */ - -/* 7.21 String handling +/* String handling This file is part of the Public Domain C Library (PDCLib). Permission is granted to use, modify, and / or redistribute at will. @@ -9,7 +7,10 @@ #ifndef _PDCLIB_STRING_H #define _PDCLIB_STRING_H _PDCLIB_STRING_H #include <_PDCLIB_int.h> -_PDCLIB_BEGIN_EXTERN_C + +#ifdef __cplusplus +extern "C" { +#endif #ifndef _PDCLIB_SIZE_T_DEFINED #define _PDCLIB_SIZE_T_DEFINED _PDCLIB_SIZE_T_DEFINED @@ -196,5 +197,20 @@ char * strdup( const char* src ) _PDCLIB_nothrow; char * strndup( const char* src, size_t n ) _PDCLIB_nothrow; #endif -_PDCLIB_END_EXTERN_C +#if _PDCLIB_BSD_SOURCE +size_t strlcpy( + char *_PDCLIB_restrict _Dst, + const char *_PDCLIB_restrict _Src, + size_t _DstSize) _PDCLIB_nothrow; + +size_t strlcat( + char *_PDCLIB_restrict _Dst, + const char *_PDCLIB_restrict _Src, + size_t _DstSize) _PDCLIB_nothrow; +#endif + +#ifdef __cplusplus +} +#endif + #endif