|
Packit Service |
e2ebee |
/* Copyright libuv project contributors. All rights reserved.
|
|
Packit Service |
e2ebee |
*
|
|
Packit Service |
e2ebee |
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
Packit Service |
e2ebee |
* of this software and associated documentation files (the "Software"), to
|
|
Packit Service |
e2ebee |
* deal in the Software without restriction, including without limitation the
|
|
Packit Service |
e2ebee |
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
Packit Service |
e2ebee |
* sell copies of the Software, and to permit persons to whom the Software is
|
|
Packit Service |
e2ebee |
* furnished to do so, subject to the following conditions:
|
|
Packit Service |
e2ebee |
*
|
|
Packit Service |
e2ebee |
* The above copyright notice and this permission notice shall be included in
|
|
Packit Service |
e2ebee |
* all copies or substantial portions of the Software.
|
|
Packit Service |
e2ebee |
*
|
|
Packit Service |
e2ebee |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
Packit Service |
e2ebee |
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
Packit Service |
e2ebee |
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
Packit Service |
e2ebee |
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
Packit Service |
e2ebee |
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
Packit Service |
e2ebee |
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
Packit Service |
e2ebee |
* IN THE SOFTWARE.
|
|
Packit Service |
e2ebee |
*/
|
|
Packit Service |
e2ebee |
|
|
Packit Service |
7c31a4 |
#ifndef UV_STRSCPY_H_
|
|
Packit Service |
7c31a4 |
#define UV_STRSCPY_H_
|
|
Packit Service |
7c31a4 |
|
|
Packit Service |
7c31a4 |
/* Include uv.h for its definitions of size_t and ssize_t.
|
|
Packit Service |
7c31a4 |
* size_t can be obtained directly from <stddef.h> but ssize_t requires
|
|
Packit Service |
7c31a4 |
* some hoop jumping on Windows that I didn't want to duplicate here.
|
|
Packit Service |
7c31a4 |
*/
|
|
Packit Service |
7c31a4 |
#include "uv.h"
|
|
Packit Service |
7c31a4 |
|
|
Packit Service |
7c31a4 |
/* Copies up to |n-1| bytes from |d| to |s| and always zero-terminates
|
|
Packit Service |
7c31a4 |
* the result, except when |n==0|. Returns the number of bytes copied
|
|
Packit Service |
7c31a4 |
* or UV_E2BIG if |d| is too small.
|
|
Packit Service |
7c31a4 |
*
|
|
Packit Service |
7c31a4 |
* See https://www.kernel.org/doc/htmldocs/kernel-api/API-strscpy.html
|
|
Packit Service |
7c31a4 |
*/
|
|
Packit Service |
7c31a4 |
ssize_t uv__strscpy(char* d, const char* s, size_t n);
|
|
Packit Service |
7c31a4 |
|
|
Packit Service |
7c31a4 |
#endif /* UV_STRSCPY_H_ */
|