~ubuntu-branches/ubuntu/breezy/gettext/breezy

« back to all changes in this revision

Viewing changes to man/textdomain.3.html

  • Committer: Bazaar Package Importer
  • Author(s): Santiago Vila
  • Date: 2002-04-10 13:17:42 UTC
  • Revision ID: james.westby@ubuntu.com-20020410131742-npf89tsaygdolprj
Tags: upstream-0.10.40
ImportĀ upstreamĀ versionĀ 0.10.40

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html>
 
2
<head>
 
3
<meta name="generator" content="groff -Thtml, see www.gnu.org">
 
4
<meta name="Content-Style" content="text/css">
 
5
<title>TEXTDOMAIN</title>
 
6
</head>
 
7
<body>
 
8
 
 
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>
 
17
 
 
18
<hr>
 
19
<!-- Creator     : groff version 1.17 -->
 
20
<!-- CreationDate: Sun May 20 13:45:14 2001 -->
 
21
<a name="NAME"></a>
 
22
<h2>NAME</h2>
 
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>
 
29
<h2>SYNOPSIS</h2>
 
30
 
 
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 &lt;libintl.h&gt;
 
36
 
 
37
char * textdomain (const char *</b> <i>domainname</i><b>);
 
38
</b></pre></td></table>
 
39
<a name="DESCRIPTION"></a>
 
40
<h2>DESCRIPTION</h2>
 
41
 
 
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>
 
48
 
 
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>
 
58
 
 
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>
 
68
 
 
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>
 
77
 
 
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>
 
85
<h2>RETURN VALUE</h2>
 
86
 
 
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>
 
97
<a name="ERRORS"></a>
 
98
<h2>ERRORS</h2>
 
99
 
 
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>
 
105
 
 
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>
 
111
 
 
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>
 
117
<a name="BUGS"></a>
 
118
<h2>BUGS</h2>
 
119
 
 
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
 
126
C.</td></table>
 
127
<a name="SEE ALSO"></a>
 
128
<h2>SEE ALSO</h2>
 
129
 
 
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>
 
137
<hr>
 
138
</body>
 
139
</html>