2fe8fb192f
There is important information about booting non-ack images in docs/UPDATING. ack/aout-format images can't be built any more, and booting clang/ELF-format ones is a little different. Updating to the new boot monitor is recommended. Changes in this commit: . drop boot monitor -> allowing dropping ack support . facility to copy ELF boot files to /boot so that old boot monitor can still boot fairly easily, see UPDATING . no more ack-format libraries -> single-case libraries . some cleanup of OBJECT_FMT, COMPILER_TYPE, etc cases . drop several ack toolchain commands, but not all support commands (e.g. aal is gone but acksize is not yet). . a few libc files moved to netbsd libc dir . new /bin/date as minix date used code in libc/ . test compile fix . harmonize includes . /usr/lib is no longer special: without ack, /usr/lib plays no kind of special bootstrapping role any more and bootstrapping is done exclusively through packages, so releases depend even less on the state of the machine making them now. . rename nbsd_lib* to lib* . reduce mtree
73 lines
1.7 KiB
Groff
73 lines
1.7 KiB
Groff
.\" $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.
|