Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

catgetmsg(3int) [ultrix man page]

catgetmsg(3int) 														   catgetmsg(3int)

Name
       catgetmsg - get message from a message catalog

Syntax
       #include <nl_types.h>

       char *catgetmsg(catd, set_num, msg_num, buf, buflen)
       nl_catd catd;
       int set_num, msg_num, buflen;
       char *buf;

Description
       The  function  has been superceded by the function.  You should use the function to get messages from a message catalog.  You might want to
       rewrite calls to the function so that they use the function.  The function is available for compatibility with  XPG-2  conformant  software
       and might not be available in the future.  For more information on using see the reference page.

       The  function  attempts	to  read  up to buflen -1 bytes of a message string into the area pointed to by buf .  The parameter is an integer
       value containing the size in bytes of buf.  The return string is always terminated with a null byte.

       The parameter catd is a catalog descriptor returned from an earlier call to and identifies the message catalog containing the message set (
       set_num) and the program message  ( msg_num).

       The arguments set_num and msg_num are defined as integer values for maximum portability.  Where possible, you should use symbolic names for
       message and set numbers, rather hard-coding integer values into your source programs.  If you use symbolic names, you must run prior to and
       be sure the appropriate include file is used in your program.

Return Value
       If  successful, returns a pointer to the message string in buf.	Otherwise, if catd is invalid or if set_num or msg_num are not in the mes-
       sage catalog, returns a pointer to an empty (null) string.

See Also
       intro(3int), gencat(1int), catopen(3int), catgets(3int), nl_types(5int)
       Guide to Developing International Software

																   catgetmsg(3int)

Check Out this Related Man Page

catgets(3C)						   Standard C Library Functions 					       catgets(3C)

NAME
catgets - read a program message SYNOPSIS
#include <nl_types.h> char *catgets(nl_catd catd, int set_num, int msg_num, const char *s); DESCRIPTION
The catgets() function attempts to read message msg_num, in set set_num, from the message catalog identified by catd. The catd argument is a catalog descriptor returned from an earlier call to catopen(). The s argument points to a default message string which will be returned by catgets() if the identified message catalog is not currently available. RETURN VALUES
If the identified message is retrieved successfully, catgets() returns a pointer to an internal buffer area containing the null termi- nated message string. If the call is unsuccessful for any reason, catgets() returns a pointer to s and errno may be set to indicate the error. ERRORS
The catgets() function may fail if: EBADF The catd argument is not a valid message catalogue descriptor open for reading. EBADMSG The number of %n specifiers that appear in the message string specified by s does not match the number of %n specifiers that appear in the message identified by set_id and msg_id in the specified message catalog. EINTR The read operation was terminated due to the receipt of a signal, and no data was transferred. EINVAL The message catalog identified by catd is corrupted. ENOMSG The message identified by set_id and msg_id is not in the message catalog. USAGE
The catgets() function can be used safely in multithreaded applications as long as setlocale(3C) is not being called to change the locale. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
gencat(1), catclose(3C), catopen(3C), gettext(3C), setlocale(3C), attributes(5), standards(5) International Language Environments Guide SunOS 5.11 22 Mar 2002 catgets(3C)
Man Page