The branch main has been updated by dumbbell:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=4831a8d792d4ac2cbf4d49d9d220947fb53e2e86

commit 4831a8d792d4ac2cbf4d49d9d220947fb53e2e86
Author:     Jean-Sébastien Pédron <[email protected]>
AuthorDate: 2026-06-12 14:39:21 +0000
Commit:     Jean-Sébastien Pédron <[email protected]>
CommitDate: 2026-06-20 10:34:20 +0000

    sys: Add `isgraph()` to <sys/ctype.h>
    
    Quote from https://pubs.opengroup.org/onlinepubs/7908799/xbd/locale.html:
    
        "graph": Define characters to be classified as printable characters,
        not including the space character.
    
    Reviewed by:    emaste
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D57578
---
 sys/sys/ctype.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/sys/sys/ctype.h b/sys/sys/ctype.h
index effb549b40f8..2e5827cc02f9 100644
--- a/sys/sys/ctype.h
+++ b/sys/sys/ctype.h
@@ -87,6 +87,12 @@ isprint(int c)
        return (c >= ' ' && c <= '~');
 }
 
+static __inline int
+isgraph(int c)
+{
+       return (c != ' ' && isprint(c));
+}
+
 static __inline int
 toupper(int c)
 {

Reply via email to