Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/share/man/man3 PR/53608: Ian Bruene: document __{printf, sysl...



details:   https://anonhg.NetBSD.org/src/rev/974a4a93d13f
branches:  trunk
changeset: 433441:974a4a93d13f
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Sep 14 20:53:49 2018 +0000

description:
PR/53608: Ian Bruene: document __{printf,syslog}like.

diffstat:

 share/man/man3/attribute.3 |  24 ++++++++++++++++++++++--
 1 files changed, 22 insertions(+), 2 deletions(-)

diffs (52 lines):

diff -r d95cd186995b -r 974a4a93d13f share/man/man3/attribute.3
--- a/share/man/man3/attribute.3        Fri Sep 14 20:46:46 2018 +0000
+++ b/share/man/man3/attribute.3        Fri Sep 14 20:53:49 2018 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: attribute.3,v 1.17 2018/09/14 20:38:38 joerg Exp $
+.\" $NetBSD: attribute.3,v 1.18 2018/09/14 20:53:49 christos Exp $
 .\"
 .\" Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd October 25, 2013
+.Dd September 14, 2018
 .Dt ATTRIBUTE 3
 .Os
 .Sh NAME
@@ -64,6 +64,10 @@
 .Fn __predict_true "exp"
 .Pp
 .Fn __predict_false "exp"
+.Pp
+.Fn __printflike "fmtarg" "firstvararg"
+.Pp
+.Fn __sysloglike "fmtarg" "firstvararg"
 .Sh DESCRIPTION
 As an extension to the C standard, some compilers allow non-standard
 attributes to be associated with functions, variables, or types, to
@@ -357,6 +361,22 @@
 .Ic __predict_false
 and
 .Ic __predict_true .
+.It Fn __printflike "fmtarg" "firstvararg"
+Marks a function as taking printf-like arguments.
+.Fa fmtarg
+is the index of the format string in the argument list, and
+.Fa firstvararg
+is the index of the first item of the vararg list.
+.It Fn __sysloglike "fmtarg" "firstvararg"
+Marks a function as taking syslog-like arguments.
+Allows use of the %m formatting code.
+.Fa fmtarg
+is the index of the format string in the argument list, and
+.Fa firstvararg
+is the index of the first item of the vararg list, or
+.Dv 0
+if the argument is a
+.Ft va_list .
 .El
 .Sh SEE ALSO
 .Xr clang 1 ,



Home | Main Index | Thread Index | Old Index