2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: nlmsg.c /main/1 1996/10/30 19:10:20 cde-hp $ */
28 * (c) Copyright 1996 Digital Equipment Corporation.
29 * (c) Copyright 1996 Hewlett-Packard Company.
30 * (c) Copyright 1996 International Business Machines Corp.
31 * (c) Copyright 1996 Sun Microsystems, Inc.
32 * (c) Copyright 1996 Novell, Inc.
33 * (c) Copyright 1996 FUJITSU LIMITED.
34 * (c) Copyright 1996 Hitachi.
41 #if !defined(NL_CAT_LOCALE)
42 #define NL_CAT_LOCALE 0
45 #define DTPDMD_CAT_NAME "dtpdmd"
50 * ------------------------------------------------------------------------
51 * Default message values
55 const char DtPdmdMsg_0001[] = "\
56 usage: %1$s [options]\n\
58 where [options] includes:\n\
59 -d <display> host:display[.screen] of X Print Server\n\
60 -a <alt selection> an alternate selection name (\"%2$s\" default)\n\
61 -p <default pdm> a default pdm to launch (\"%3$s\" default)\n\
62 -P <the pdm> the pdm to launch, overrides all others\n\
63 -s turn on security protocol\n\
64 -f <auth file> an initial set of authorization cookies\n\
65 -l <log file> a file for the logging of errors, etc";
67 const char DtPdmdMsg_0002[] = "%1$s: error, cannot open display %2$s\n";
68 const char DtPdmdMsg_0003[] = "%1$s: error, cannot acquire selection %2$s\n";
69 const char DtPdmdMsg_0004[] = "%s: error, cannot create Xt Signal Pipe\n";
73 const char DtPdmdMsg_0005[] = "%s: error, unable to get SelectionRequest property\n";
74 const char DtPdmdMsg_0006[] = "%s: error, invalid format for SelectionRequest property\n";
75 const char DtPdmdMsg_0007[] = "%s: error, XmbTextPropertyToTestList failed on SelectionRequest property\n";
76 const char DtPdmdMsg_0008[] = "%s: error, unable to create message pipe\n";
77 const char DtPdmdMsg_0009[] = "%s: error, unable to fork\n";
78 const char DtPdmdMsg_0010[] = "%1$s: error, cannot execute \"%2$s\" \n";
80 const char DtPdmdMsg_0011[] = "\
81 %1$s: exec message logged at %2$s\n\
82 exec error message = \"%3$s\"\n\
83 exec error code = %4$s\n\
85 -display = \"%6$s\"\n\
86 -vdisplay = \"%7$s\" \n";
88 const char DtPdmdMsg_0012[] = "\
89 %1$s: error, unable to send the final %2$s\n\
90 message to the requesting client on behalf of\n\
91 the PDM because of a generated X error\n";
93 const char DtPdmdMsg_0013[] = "\
94 %1$s: error, unable to send the final %2$s\n\
95 message to the requesting client on behalf of\n\
96 the PDM because of an XIO error\n";
98 const char DtPdmdMsg_0014[] = "\
99 %1$s: pdm message logged at %2$s\n\
101 -display = \"%4$s\"\n\
102 -vdisplay = \"%5$s\"\n\
103 exit code = \"%6$d\"\n\
104 stderr = \"%7$s\" \n";
106 const char DtPdmdMsg_0015[] = "\
107 attached pdmd error= \n\"%s\" \n";
109 const char DtPdmdMsg_0016[] = "%1$s: error, cannot open log file \"%2$s\". Turning off stderr message logging\n";
114 * ------------------------------------------------------------------------
115 * Name: DtPdmdGetMessage
119 * int set - The message catalog set number.
121 * int n - The message number.
123 * char *s - The default message if the message is not
124 * retrieved from a message catalog.
126 * Returns: the string for set 'set' and number 'n'.
137 static int first = 1;
138 static nl_catd nlmsg_fd;
140 if(set == -1 || n == -1)
146 nlmsg_fd = catopen(DTPDMD_CAT_NAME, NL_CAT_LOCALE);
148 msg=catgets(nlmsg_fd,set,n,s);
151 #endif /* I18N_MSG */