1.\" $NetBSD: catgets.3,v 1.11 2002/02/07 07:00:22 ross Exp $ 2.\" 3.\" Written by J.T. Conklin <jtc@netbsd.org>. 4.\" Public domain. 5.\" 6.Dd February 8, 1998 7.Dt CATGETS 3 8.Os 9.Sh NAME 10.Nm catgets 11.Nd retrieve string from message catalog 12.Sh LIBRARY 13.Lb libc 14.Sh SYNOPSIS 15.Fd #include \*[Lt]nl_types.h\*[Gt] 16.Ft char * 17.Fn catgets "nl_catd catd" "int set_id" "int msg_id" "const char *s" 18.Sh DESCRIPTION 19The 20.Fn catgets 21function attempts to retrieve message 22.Fa msg_id 23of set 24.Fa set_id 25from the message catalog referenced by the descriptor 26.Fa catd . 27The argument 28.Fa s 29points to a default message which is returned if the function 30is unable to retrieve the specified message. 31.Sh RETURN VALUES 32If the specified message was retrieved successfully, 33.Fn catgets 34returns a pointer to an internal buffer containing the message string; 35otherwise it returns 36.Fa s . 37.Sh ERRORS 38The 39.Fn catgets 40function will fail if: 41.Bl -tag -width Er 42.It Bq Er EBADF 43The 44.Fa catd 45argument is not a valid message catalog descriptor open for reading. 46.It Bq Er EINTR 47The operation was interrupted by a signal. 48.It Bq Er ENOMSG 49The message identified by 50.Fa set_id 51and 52.Fa msg_id 53is not in the message catalog. 54.El 55.Sh SEE ALSO 56.Xr catclose 3 , 57.Xr catopen 3 58.Sh STANDARDS 59The 60.Fn catgets 61function conforms to 62.St -xpg4.2 . 63