Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

gettxt(3c) [hpux man page]

gettxt(3C)																gettxt(3C)

NAME
gettxt() - read text string from message file SYNOPSIS
DESCRIPTION
The routine retrieves a text string from a message file for the current locale. msg_id has the following syntax: where msgfilename is the name of the message file generated by mkmsgs(1). If msgfilename is NULL, uses the message file specified in the last call to setcat(3C). msgnumber is the sequence number of the text string in the message file (the sequence begins at 1). returns the message under any of the following conditions: o msgfilename is an invalid message catalog name. o No catalog is specified in msg_id or through setcat(3C). o msgnumber is not a positive number. o No message could be retrieved and def_str is NULL. EXTERNAL INFLUENCES
Environment Variables uses the environment variable to determine the locale to use to search for the msgfilename message file. If is not set, the environment variable is used. If is not set, the "C" locale will be used. The user can also change the locale via the setlocale(3C) routine. If the msgfilename message file is not found in the specified locale or if the msgnumber is out of bounds, attempts to retrieve the text string from the "C" locale. def_str is the string returned if a text string cannot be retrieved even from the "C" locale. EXAMPLES
The following code fragments are equivalent: WARNINGS
Obsolescent Interfaces is to be obsoleted at a future date. SEE ALSO
mkmsgs(1), setcat(3C), setlocale(3C), environ(5), thread_safety(5). STANDARDS COMPLIANCE
TO BE OBSOLETED gettxt(3C)

Check Out this Related Man Page

pfmt(3C)																  pfmt(3C)

NAME
pfmt(), vpfmt() - display message in standard format SYNOPSIS
DESCRIPTION
The system call can be used to write a message in standard format to stream. It can also be used to write a localized string to stream. The arguments to are formatted using style formatting. is similar to except that the arguments are passed in an argument list (see stdarg(5)). The standard format displayed on stream has the following fields: The label string is defined through setlabel(3C). If no label is defined, this field is not used. The severity string is controlled by the severity group of flags. The text string is the formatted user string. The flags control how formatting is done. The control information is separated into several different groups. Only one flag from each group should be set. Output Format Do not use the standard format. Treat fmt as a format string. In this mode, only flags related to catalog access can be set. Format using the standard format is the default). Catalog Access Do not access the localized message catalog. Use the def_str (a field in fmt) as the format string. Access the localized message catalog is the default). Severity Display a localized string. Display a localized string is the default). Display a localized string. Display a localized string. Besides these reserved severities, additional severity strings may be defined by the user (see addsev(3C)). To specify a user defined severity, flags should be a logical-or of the numeric value of the user defined severity and flags from other control groups. Action This flag generates the localized string of in the severity field of the standard format message. If this flag and flags from the severity control group are set, this flag has precedence and the string will be displayed. The fmt string has the following fields: The catalog is the message catalog created by mkmsgs(1) where the localized message is to be retrieved. The msg_number is a positive index number identifying the string to be retrieved from the message catalog (begins at 1). The def_str is the default string to use if fails to retrieve the message from catalog from either the current locale or the default locale. The failure may occur if the message catalog does not exist or if the msg_number is out of bound. If catalog is not specified, uses the message catalog defined by setcat(3C). If is set in flags, only def_str must be specified. The system call displays under the following conditions: o No message catalog is specified in fmt and no catalog is defined via setcat(3C). o msg_number is not positive. o No message could be retrieved and def_str is not specified. RETURN VALUE
If successful, and return the number of bytes written. Otherwise, they return a negative value. EXAMPLES
Example 1 generates the message: Example 2 generates the message: Example 3 generates the message: Example 4 generates the message: SEE ALSO
mkmsgs(1), addsev(3C), gettxt(3C), printf(3S), setcat(3C), setlabel(3C), setlocale(3C), stdarg(5), thread_safety(5). STANDARDS CONFORMANCE
pfmt(3C)
Man Page