3
<meta name="generator" content="groff -Thtml, see www.gnu.org">
4
<meta name="Content-Style" content="text/css">
5
<title>TEXTDOMAIN</title>
9
<h1 align=center>TEXTDOMAIN</h1>
10
<a href="#NAME">NAME</a><br>
11
<a href="#SYNOPSIS">SYNOPSIS</a><br>
12
<a href="#DESCRIPTION">DESCRIPTION</a><br>
13
<a href="#RETURN VALUE">RETURN VALUE</a><br>
14
<a href="#ERRORS">ERRORS</a><br>
15
<a href="#BUGS">BUGS</a><br>
16
<a href="#SEE ALSO">SEE ALSO</a><br>
19
<!-- Creator : groff version 1.17 -->
20
<!-- CreationDate: Sun May 20 13:45:14 2001 -->
23
<table width="100%" border=0 rules="none" frame="void"
24
cols="2" cellspacing="0" cellpadding="0">
25
<tr valign="top" align="left">
26
<td width="10%"></td><td width="90%">
27
textdomain - set domain for future gettext() calls</td></table>
28
<a name="SYNOPSIS"></a>
31
<table width="100%" border=0 rules="none" frame="void"
32
cols="2" cellspacing="0" cellpadding="0">
33
<tr valign="top" align="left">
34
<td width="10%"></td><td width="90%">
35
<pre><b>#include <libintl.h>
37
char * textdomain (const char *</b> <i>domainname</i><b>);
38
</b></pre></td></table>
39
<a name="DESCRIPTION"></a>
42
<table width="100%" border=0 rules="none" frame="void"
43
cols="2" cellspacing="0" cellpadding="0">
44
<tr valign="top" align="left">
45
<td width="10%"></td><td width="90%">
46
The <b>textdomain</b> function sets or retrieves the current
47
message domain.</td></table>
49
<table width="100%" border=0 rules="none" frame="void"
50
cols="2" cellspacing="0" cellpadding="0">
51
<tr valign="top" align="left">
52
<td width="10%"></td><td width="90%">
53
A message domain is a set of translatable <i>msgid</i>
54
messages. Usually, every software package has its own
55
message domain. The domain name is used to determine the
56
message catalog where a translation is looked up; it must be
57
a non-empty string.</td></table>
59
<table width="100%" border=0 rules="none" frame="void"
60
cols="2" cellspacing="0" cellpadding="0">
61
<tr valign="top" align="left">
62
<td width="10%"></td><td width="90%">
63
The current message domain is used by the <b>gettext</b>,
64
<b>ngettext</b> functions, and by the <b>dgettext</b>,
65
<b>dcgettext</b>, <b>dngettext</b> and <b>dcngettext</b>
66
functions when called with a NULL domainname
67
argument.</td></table>
69
<table width="100%" border=0 rules="none" frame="void"
70
cols="2" cellspacing="0" cellpadding="0">
71
<tr valign="top" align="left">
72
<td width="10%"></td><td width="90%">
73
If <i>domainname</i> is not NULL, the current message domain
74
is set to <i>domainname</i>. The string the function stores
75
internally is a copy of the <i>domainname</i>
76
argument.</td></table>
78
<table width="100%" border=0 rules="none" frame="void"
79
cols="2" cellspacing="0" cellpadding="0">
80
<tr valign="top" align="left">
81
<td width="10%"></td><td width="90%">
82
If <i>domainname</i> is NULL, the function returns the
83
current message domain.</td></table>
84
<a name="RETURN VALUE"></a>
87
<table width="100%" border=0 rules="none" frame="void"
88
cols="2" cellspacing="0" cellpadding="0">
89
<tr valign="top" align="left">
90
<td width="10%"></td><td width="90%">
91
If successful, the <b>textdomain</b> function returns the
92
current message domain, after possibly changing it. The
93
resulting string is valid until the next <b>textdomain</b>
94
call and must not be modified or freed. If a memory
95
allocation failure occurs, it sets <b>errno</b> to
96
<b>ENOMEM</b> and returns NULL.</td></table>
100
<table width="100%" border=0 rules="none" frame="void"
101
cols="2" cellspacing="0" cellpadding="0">
102
<tr valign="top" align="left">
103
<td width="10%"></td><td width="90%">
104
The following error can occur, among others:</td></table>
106
<table width="100%" border=0 rules="none" frame="void"
107
cols="2" cellspacing="0" cellpadding="0">
108
<tr valign="top" align="left">
109
<td width="10%"></td><td width="90%">
110
<b>ENOMEM</b></td></table>
112
<table width="100%" border=0 rules="none" frame="void"
113
cols="2" cellspacing="0" cellpadding="0">
114
<tr valign="top" align="left">
115
<td width="21%"></td><td width="79%">
116
Not enough memory available.</td></table>
120
<table width="100%" border=0 rules="none" frame="void"
121
cols="2" cellspacing="0" cellpadding="0">
122
<tr valign="top" align="left">
123
<td width="10%"></td><td width="90%">
124
The return type ought to be <b>const char *</b>, but is
125
<b>char *</b> to avoid warnings in C code predating ANSI
127
<a name="SEE ALSO"></a>
130
<table width="100%" border=0 rules="none" frame="void"
131
cols="2" cellspacing="0" cellpadding="0">
132
<tr valign="top" align="left">
133
<td width="10%"></td><td width="90%">
134
<b>gettext</b>(3), <b>ngettext</b>(3),
135
<b>bindtextdomain</b>(3),
136
<b>bind_textdomain_codeset</b>(3)</td></table>