From 1a4696492e3cd478080e438950a7664a68fefcd6 Mon Sep 17 00:00:00 2001 From: axtloss Date: Sat, 13 Jul 2024 13:32:53 +0200 Subject: Add manpages for each extlib function --- doc/memset_s.3 | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 doc/memset_s.3 (limited to 'doc/memset_s.3') diff --git a/doc/memset_s.3 b/doc/memset_s.3 new file mode 100644 index 0000000..57956d0 --- /dev/null +++ b/doc/memset_s.3 @@ -0,0 +1,51 @@ +'\" t +.\" Copyright 2024 axtlos (axtlos@disroot.org) +.\" +.\" SPDX-License-Identifier: BSD-3-Clause + +.TH memset_s 3 2024-07-14 "extlib" +.SH NAME +fcopy \- copy a file +.SH LIBRARY +extlib extended standard library +.RI ( libextlib ", " \-lextlib ) +.SH SYNOPSIS +.nf +.B #define __STDC_WANT_LIB_EXT1__ 1 +.P +.B #include +.P +.BI "errno_t memset_s (void *s, rsize_t max, int c, rsize_t n);" +.fi +.SH DESCRIPTION +The +.BR memset_s() +function behaves the same way as +.BR memset () +except that it will not be removed through Dead Store Elimination, +which makes it useful when sensitive data needs to be cleared. +Unlike +.BR memset() +, +.BR memset_s() +will also return an error and call the currently registered constraint handler +if +.I *s +is a null pointer, +.I max +or +.I n +is greater than RSIZE_MAX, or +.I n +is greater than max. +.fi +.SH RETURN VALUE +The +.BR memset_s () +returns zero on success, non-zero on error. +.I *src +to +.IR *dst . +.SH STANDARDS +.BR memset_s () +conforms to ISO/IEC 9899:2011 ("ISO C11") K.3.7.4.1. -- cgit v1.2.3