Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

nl_types.h(3head) [opensolaris man page]

nl_types.h(3HEAD)						      Headers							 nl_types.h(3HEAD)

NAME
nl_types.h, nl_types - native language data types SYNOPSIS
#include <nl_types.h> DESCRIPTION
This header contains the following definitions: nl_catd Used by the message catalog functions catopen, catgets and catclose to identify a catalog. nl_item Used by nl_langinfo to identify items of langinfo data. Values for objects of type nl_item are defined in <langinfo.h>. NL_SETD Used by gencat when no $set directive is specified in a message text source file. This constant can be used in subsequent calls to catgets as the value of the set identifier parameter. NL_MGSMAX Maximum number of messages per set. NL_SETMAX Maximum number of sets per catalog. NL_TEXTMAX Maximum size of a message. SEE ALSO
gencat(1), catgets(3C), catopen(3C), nl_langinfo(3C), langinfo.h(3HEAD) SunOS 5.11 3 Jul 1990 nl_types.h(3HEAD)

Check Out this Related Man Page

catgets(3int)															     catgets(3int)

Name
       catgets - read a program message

Syntax
       #include <nl_types.h>

       char *catgets (catd, set_num, msg_num, s)
       nl_catd catd;
       int set_num, msg_num;
       char *s;

Description
       The  function attempts to read message msg_num in set set_num from the message catalog identified by catd.  The parameter catd is a catalog
       descriptor returned from an earlier call to The pointer, s, points to a default message string.	The function returns the  default  message
       if the identified message catalog is not currently available.

       The function stores the message text it returns in an internal buffer area.  This buffer area might be written over by a subsequent call to
       If you want to re-use or modify the message text, you should copy it to another location.

       The arguments set_num and msg_num are defined as integer values to make programs that contain  the  call  portable.   Where  possible,  you
       should  use  symbolic  names for message and set numbers, instead of hard-coding integer values into your source programs.  If you use sym-
       bolic names, you must include the header file that creates in all your program modules.

Examples
       The following example shows using the call to retrieve a message from a message catalog that uses symbolic names for set and  message  num-
       bers:
       nl_catd catd = catopen (messages.msf, 0)
       message = catgets (catd, error_set, bad_value, "Invalid value")
       When this call executes, searches for the message catalog identified by the catalog descriptor stored in The function searches for the mes-
       sage identified by the symbolic name in the set identified by the symbolic name and stores the message text in If cannot find the  message,
       it returns the message Invalid value.

Return Values
       If  successfully  retrieves the message, it returns a pointer to an internal buffer area containing the null terminated message string.	If
       the call is unsuccessful for any reason, catgets returns the default message in s.

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

																     catgets(3int)
Man Page