summaryrefslogtreecommitdiff
path: root/static/netbsd/man3/catgets.3
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-25 19:55:15 -0400
committerJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-25 19:55:15 -0400
commit253e67c8b3a72b3a4757fdbc5845297628db0a4a (patch)
treeadf53b66087aa30dfbf8bf391a1dadb044c3bf4d /static/netbsd/man3/catgets.3
parenta9157ce950dfe2fc30795d43b9d79b9d1bffc48b (diff)
docs: Added All NetBSD Manuals
Diffstat (limited to 'static/netbsd/man3/catgets.3')
-rw-r--r--static/netbsd/man3/catgets.373
1 files changed, 73 insertions, 0 deletions
diff --git a/static/netbsd/man3/catgets.3 b/static/netbsd/man3/catgets.3
new file mode 100644
index 00000000..87c798f7
--- /dev/null
+++ b/static/netbsd/man3/catgets.3
@@ -0,0 +1,73 @@
+.\" $NetBSD: catgets.3,v 1.16 2003/07/26 19:24:49 salo Exp $
+.\"
+.\" Written by J.T. Conklin <jtc@NetBSD.org>.
+.\" Public domain.
+.\"
+.Dd February 12, 2003
+.Dt CATGETS 3
+.Os
+.Sh NAME
+.Nm catgets
+.Nd retrieve string from message catalog
+.Sh LIBRARY
+.Lb libc
+.Sh SYNOPSIS
+.In nl_types.h
+.Ft char *
+.Fn catgets "nl_catd catd" "int set_id" "int msg_id" "const char *s"
+.Sh DESCRIPTION
+The
+.Fn catgets
+function attempts to retrieve message
+.Fa msg_id
+of set
+.Fa set_id
+from the message catalog referenced by the descriptor
+.Fa catd .
+The argument
+.Fa s
+points to a default message which is returned if the function
+is unable to retrieve the specified message.
+.Sh RETURN VALUES
+If the specified message was retrieved successfully,
+.Fn catgets
+returns a pointer to an internal buffer containing the message string;
+otherwise it returns
+.Fa s .
+.Sh ERRORS
+The
+.Fn catgets
+function will fail if:
+.Bl -tag -width Er
+.It Bq Er EBADF
+The
+.Fa catd
+argument is not a valid message catalog descriptor open for reading.
+.It Bq Er EINTR
+The operation was interrupted by a signal.
+.It Bq Er ENOMSG
+The message identified by
+.Fa set_id
+and
+.Fa msg_id
+is not in the message catalog.
+.El
+.Sh SEE ALSO
+.Xr gencat 1 ,
+.Xr catclose 3 ,
+.Xr catopen 3 ,
+.Xr nls 7
+.Sh STANDARDS
+The
+.Fn catgets
+function conforms to
+.St -xpg4.2 .
+.Pp
+Major Unix vendors are split over the adoption of the two most
+important message catalog specifications: catgets or
+.Xr gettext 3 .
+The primary concern with the catgets interface is that every
+translatable string has to define a number (or a symbolic constant)
+which must correspond to the message in the catalog.
+Duplicate message IDs are not allowed.
+Constructing message catalogs is difficult.