diff options
Diffstat (limited to 'lib/libc/gen/isgraph.3')
-rw-r--r-- | lib/libc/gen/isgraph.3 | 60 |
1 files changed, 49 insertions, 11 deletions
diff --git a/lib/libc/gen/isgraph.3 b/lib/libc/gen/isgraph.3 index fab5db54ccc..e27a6257d05 100644 --- a/lib/libc/gen/isgraph.3 +++ b/lib/libc/gen/isgraph.3 @@ -1,6 +1,7 @@ -.\" $OpenBSD: isgraph.3,v 1.11 2013/07/06 17:31:20 jmc Exp $ +.\" $OpenBSD: isgraph.3,v 1.12 2017/09/05 03:16:13 schwarze Exp $ .\" .\" Copyright (c) 1991 The Regents of the University of California. +.\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org> .\" All rights reserved. .\" .\" This code is derived from software contributed to Berkeley by @@ -31,26 +32,49 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd $Mdocdate: July 6 2013 $ +.Dd $Mdocdate: September 5 2017 $ .Dt ISGRAPH 3 .Os .Sh NAME -.Nm isgraph -.Nd printing character test (space character exclusive) +.Nm isgraph , +.Nm isgraph_l +.Nd printing single-byte character test (space character exclusive) .Sh SYNOPSIS .In ctype.h .Ft int .Fn isgraph "int c" +.Ft int +.Fn isgraph_l "int c" "locale_t locale" .Sh DESCRIPTION The .Fn isgraph -function tests for any printing character except space +and +.Fn isgraph_l +functions tests for any printing character except space .Pq Sq \ \& . +.Pp +In the C locale, the complete list of printing characters +consists of the characters numbered 0x21\(en0x7e, which is +the union of the characters for which +.Xr isalnum 3 +or +.Xr ispunct 3 +is true. +.Ox +always uses the C locale for these functions, +ignoring the global locale, the thread-specific locale, and the +.Fa locale +argument. .Sh RETURN VALUES -The -.Fn isgraph -function returns zero if the character tests false or +These functions return zero if the character tests false or non-zero if the character tests true. +.Sh ENVIRONMENT +On systems supporting non-ASCII single-byte character encodings, +results of these functions may differ, and the results of +.Fn isgraph +may depend on the +.Ev LC_CTYPE +.Xr locale 1 . .Sh SEE ALSO .Xr isalnum 3 , .Xr isalpha 3 , @@ -63,6 +87,7 @@ non-zero if the character tests true. .Xr ispunct 3 , .Xr isspace 3 , .Xr isupper 3 , +.Xr iswgraph 3 , .Xr isxdigit 3 , .Xr stdio 3 , .Xr toascii 3 , @@ -73,10 +98,23 @@ non-zero if the character tests true. The .Fn isgraph function conforms to -.St -ansiC . -.Sh CAVEATS -The argument to +.St -ansiC , +and +.Fn isgraph_l +to +.St -p1003.1-2008 . +.Sh HISTORY +The .Fn isgraph +function first appeared in +.At III , +and +.Fn isgraph_l +has been available since +.Ox 6.2 . +.Sh CAVEATS +The argument +.Fa c must be .Dv EOF or representable as an |