![]() |
![]() |
|
|
![]() |
![]() |
HP-UX Reference Volume 4 of 5 > g![]() gettxt(3C) |
|
NAMEgettxt() — read text string from message file DESCRIPTIONThe gettxt() routine retrieves a text string from a message file for the current locale. msg_id has the following syntax: msgfilename:msgnumber where msgfilename is the name of the message file generated by mkmsgs(1). If msgfilename is NULL, gettxt() 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). gettxt() returns the message Message not found!! under any of the following conditions:
APPLICATION USAGEgettxt() is thread-safe. It is not async-cancel-safe. A cancellation point may occur when a thread is executing gettxt(). EXTERNAL INFLUENCESEnvironment Variablesgettxt() uses the environment variable LC_MESSAGES to determine the locale to use to search for the msgfilename message file. If LC_MESSAGES is not set, the environment variable LANG is used. If LANG 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, gettxt() 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. |
![]() |
||
![]() |
![]() |
![]() |
|||||||||||||
|