]> git.saurik.com Git - apple/libc.git/blame_incremental - gen/FreeBSD/err.3.patch
Libc-763.12.tar.gz
[apple/libc.git] / gen / FreeBSD / err.3.patch
... / ...
CommitLineData
1--- err.3.orig 2009-11-07 14:51:37.000000000 -0800
2+++ err.3 2009-11-07 14:51:40.000000000 -0800
3@@ -28,7 +28,7 @@
4 .\" From: @(#)err.3 8.1 (Berkeley) 6/9/93
5 .\" $FreeBSD: src/lib/libc/gen/err.3,v 1.24 2008/10/31 15:14:40 rwatson Exp $
6 .\"
7-.Dd March 6, 1999
8+.Dd May 20, 2008
9 .Dt ERR 3
10 .Os
11 .Sh NAME
12@@ -45,6 +45,9 @@
13 .Nm warnx ,
14 .Nm vwarnx ,
15 .Nm err_set_exit ,
16+#ifdef UNIFDEF_BLOCKS
17+.Nm err_set_exit_b ,
18+#endif
19 .Nm err_set_file
20 .Nd formatted error messages
21 .Sh LIBRARY
22@@ -55,6 +58,10 @@
23 .Fn err "int eval" "const char *fmt" "..."
24 .Ft void
25 .Fn err_set_exit "void (*exitf)(int)"
26+#ifdef UNIFDEF_BLOCKS
27+.Ft void
28+.Fn err_set_exit_b "void (^exitb)(int)"
29+#endif
30 .Ft void
31 .Fn err_set_file "void *vfp"
32 .Ft void
33@@ -165,6 +172,24 @@ function can be used to specify a functi
34 to perform any necessary cleanup; passing a null function pointer for
35 .Va exitf
36 resets the hook to do nothing.
37+#ifdef UNIFDEF_BLOCKS
38+The
39+.Fn err_set_exit_b
40+function is like
41+.Fn err_set_exit
42+except it takes a block pointer instead of a function pointer.
43+.Bd -ragged -offset indent
44+Note: The
45+.Fn Block_copy
46+function (defined in
47+.In Blocks.h )
48+is used by
49+.Fn err_set_exit_b
50+to make a copy of the block, especially for the case when a stack-based
51+block might go out of scope when the subroutine returns.
52+.Ed
53+.Pp
54+#endif
55 The
56 .Fn err_set_file
57 function sets the output stream used by the other functions.
58@@ -231,3 +256,8 @@ and
59 .Fn warnc
60 functions first appeared in
61 .Fx 3.0 .
62+#ifdef UNIFDEF_BLOCKS
63+The
64+.Fn err_set_exit_b
65+function first appeared in Mac OS X 10.6.
66+#endif