1 /* $XConsortium: GetMessage.c /main/5 1996/06/21 17:22:13 ageorge $ */
3 * (c) Copyright 1993, 1994 Hewlett-Packard Company *
4 * (c) Copyright 1993, 1994 International Business Machines Corp. *
5 * (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
6 * (c) Copyright 1993, 1994 Novell, Inc. *
8 /*************************************<+>*************************************
9 *****************************************************************************
15 ** Description: This file contains the library source code to get
16 ** a localized message.
19 ** (c) Copyright 1992 by Hewlett-Packard Company
22 ****************************************************************************
23 ************************************<+>*************************************/
27 #include "DtSvcLock.h"
29 #if !defined(NL_CAT_LOCALE)
30 #define NL_CAT_LOCALE 0
33 /*****************************************************************************
35 * Function: _DtGetMessage
39 * char *filename - Filename to open.
41 * int set - The message catalog set number.
43 * int n - The message number.
45 * char *s - The default message if the message is not
46 * retrieved from a message catalog.
48 * Returns: the string for set 'set' and number 'n'.
50 *****************************************************************************/
64 static nl_catd nlmsg_fd;
70 nlmsg_fd = catopen(filename, NL_CAT_LOCALE);
72 msg=catgets(nlmsg_fd,set,n,s);
73 _DtSvcProcessUnlock();