~ubuntu-branches/ubuntu/karmic/libgsf/karmic

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Text</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
<link rel="start" href="index.html" title="GSF Reference Manual">
<link rel="up" href="parsers.html" title="Stream Parsers">
<link rel="prev" href="parsers.html" title="Stream Parsers">
<link rel="next" href="gsf-XML-and-libxml.html" title="XML and libxml">
<meta name="generator" content="GTK-Doc V1.6 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="intro.html" title="Part&#160;I.&#160;GSF: Introduction">
<link rel="part" href="history.html" title="Part&#160;II.&#160;GSF: History">
<link rel="part" href="dependencies.html" title="Part&#160;III.&#160;GSF: Dependencies">
<link rel="part" href="gsf-users.html" title="Part&#160;IV.&#160;Projects using GSF">
<link rel="part" href="api.html" title="Part&#160;V.&#160;API Reference">
<link rel="chapter" href="io.html" title="Basic Input/Output">
<link rel="chapter" href="sources.html" title="Stream Sources">
<link rel="chapter" href="parsers.html" title="Stream Parsers">
<link rel="chapter" href="misc.html" title="Miscellaneous">
<link rel="index" href="ix01.html" title="Index">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="parsers.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="parsers.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GSF Reference Manual</th>
<td><a accesskey="n" href="gsf-XML-and-libxml.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#top_of_page" class="shortcut">Top</a>
                  &#160;|&#160;
                  <a href="#desc" class="shortcut">Description</a>
                  &#160;|&#160;
                  <a href="#object_hierarchy" class="shortcut">Object Hierarchy</a>
                  &#160;|&#160;
                  <a href="#properties" class="shortcut">Properties</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="gsf-Text"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="top_of_page"></a>Text</span></h2>
<p>Text &#8212; </p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="synopsis"></a><h2>Synopsis</h2>
<a name="GsfInputTextline"></a><a name="GsfOutputIconv"></a><a name="GsfOutputCsv"></a><pre class="synopsis">



            <a href="gsf-Text.html#GsfInputTextline-struct">GsfInputTextline</a>;
<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a>*   <a href="gsf-Text.html#gsf-input-textline-new">gsf_input_textline_new</a>          (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *source);
unsigned char* <a href="gsf-Text.html#gsf-input-textline-ascii-gets">gsf_input_textline_ascii_gets</a>
                                            (<a href="gsf-Text.html#GsfInputTextline">GsfInputTextline</a> *textline);
guint8*     <a href="gsf-Text.html#gsf-input-textline-utf8-gets">gsf_input_textline_utf8_gets</a>    (<a href="gsf-Text.html#GsfInputTextline">GsfInputTextline</a> *textline);
            <a href="gsf-Text.html#GsfOutputIconv-struct">GsfOutputIconv</a>;
<a href="gsf-Output-to-unstructured-files.html#GsfOutput">GsfOutput</a>*  <a href="gsf-Text.html#gsf-output-iconv-new">gsf_output_iconv_new</a>            (<a href="gsf-Output-to-unstructured-files.html#GsfOutput">GsfOutput</a> *sink,
                                             char const *dst,
                                             char const *src);
            <a href="gsf-Text.html#GsfOutputCsv-struct">GsfOutputCsv</a>;
gboolean    <a href="gsf-Text.html#gsf-output-csv-write-eol">gsf_output_csv_write_eol</a>        (<a href="gsf-Text.html#GsfOutputCsv">GsfOutputCsv</a> *csv);
gboolean    <a href="gsf-Text.html#gsf-output-csv-write-field">gsf_output_csv_write_field</a>      (<a href="gsf-Text.html#GsfOutputCsv">GsfOutputCsv</a> *csv,
                                             char const *field,
                                             size_t len);
enum        <a href="gsf-Text.html#GsfOutputCsvQuotingMode">GsfOutputCsvQuotingMode</a>;

</pre>
</div>
<div class="refsect1" lang="en">
<a name="object_hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">

  GObject
   +----<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a>
         +----GsfInputTextline
</pre>
<pre class="synopsis">

  GObject
   +----<a href="gsf-Output-to-unstructured-files.html#GsfOutput">GsfOutput</a>
         +----GsfOutputIconv
</pre>
<pre class="synopsis">

  GObject
   +----<a href="gsf-Output-to-unstructured-files.html#GsfOutput">GsfOutput</a>
         +----GsfOutputCsv
</pre>
</div>
<div class="refsect1" lang="en">
<a name="properties"></a><h2>Properties</h2>
<pre class="synopsis">

  "<a href="gsf-Text.html#GsfOutputIconv--fallback">fallback</a>"             gchararray            : Read / Write
  "<a href="gsf-Text.html#GsfOutputIconv--input-charset">input-charset</a>"        gchararray            : Read / Write / Construct Only
  "<a href="gsf-Text.html#GsfOutputIconv--output-charset">output-charset</a>"       gchararray            : Read / Write / Construct Only
  "<a href="gsf-Text.html#GsfOutputIconv--sink">sink</a>"                 <a href="gsf-Output-to-unstructured-files.html#GsfOutput">GsfOutput</a>             : Read / Write / Construct Only
  "<a href="gsf-Text.html#GsfOutputCsv--eol">eol</a>"                  gchararray            : Read / Write / Construct
  "<a href="gsf-Text.html#GsfOutputCsv--quote">quote</a>"                gchararray            : Read / Write / Construct
  "<a href="gsf-Text.html#GsfOutputCsv--quoting-mode">quoting-mode</a>"         <a href="gsf-Text.html#GsfOutputCsvQuotingMode">GsfOutputCsvQuotingMode</a>  : Read / Write / Construct
  "<a href="gsf-Text.html#GsfOutputCsv--quoting-triggers">quoting-triggers</a>"     gchararray            : Read / Write
  "<a href="gsf-Text.html#GsfOutputCsv--separator">separator</a>"            gchararray            : Read / Write / Construct
  "<a href="gsf-Text.html#GsfOutputCsv--sink">sink</a>"                 <a href="gsf-Output-to-unstructured-files.html#GsfOutput">GsfOutput</a>             : Read / Write
</pre>
</div>
<div class="refsect1" lang="en">
<a name="desc"></a><h2>Description</h2>
<p>

</p>
</div>
<div class="refsect1" lang="en">
<a name="details"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2542622"></a><h3>
<a name="GsfInputTextline-struct"></a>GsfInputTextline</h3>
<a class="indexterm" name="id2542634"></a><pre class="programlisting">typedef struct _GsfInputTextline GsfInputTextline;</pre>
<p>

</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2542649"></a><h3>
<a name="gsf-input-textline-new"></a>gsf_input_textline_new ()</h3>
<a class="indexterm" name="id2542662"></a><pre class="programlisting"><a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a>*   gsf_input_textline_new          (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *source);</pre>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>This adds a reference to <em class="parameter"><code>source</code></em>.</div>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>source</code></em>&#160;:</span></td>
<td> in some combination of ascii and utf8
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td>a new file or NULL.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2542731"></a><h3>
<a name="gsf-input-textline-ascii-gets"></a>gsf_input_textline_ascii_gets ()</h3>
<a class="indexterm" name="id2542744"></a><pre class="programlisting">unsigned char* gsf_input_textline_ascii_gets
                                            (<a href="gsf-Text.html#GsfInputTextline">GsfInputTextline</a> *textline);</pre>
<p>
A utility routine to read things line by line from the underlying source.
Trailing newlines and carriage returns are stripped, and the resultant buffer
can be edited.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>textline</code></em>&#160;:</span></td>
<td> <a href="gsf-Text.html#GsfInputTextline"><span class="type">GsfInputTextline</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td>: the string read, or NULL on eof.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2542818"></a><h3>
<a name="gsf-input-textline-utf8-gets"></a>gsf_input_textline_utf8_gets ()</h3>
<a class="indexterm" name="id2542831"></a><pre class="programlisting">guint8*     gsf_input_textline_utf8_gets    (<a href="gsf-Text.html#GsfInputTextline">GsfInputTextline</a> *textline);</pre>
<p>
A utility routine to read things line by line from the underlying source.
Trailing newlines and carriage returns are stripped, and the resultant buffer
can be edited.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>textline</code></em>&#160;:</span></td>
<td> <a href="gsf-Text.html#GsfInputTextline"><span class="type">GsfInputTextline</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td> the string read, or NULL on eof.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2542902"></a><h3>
<a name="GsfOutputIconv-struct"></a>GsfOutputIconv</h3>
<a class="indexterm" name="id2542916"></a><pre class="programlisting">typedef struct _GsfOutputIconv GsfOutputIconv;</pre>
<p>

</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2542931"></a><h3>
<a name="gsf-output-iconv-new"></a>gsf_output_iconv_new ()</h3>
<a class="indexterm" name="id2542944"></a><pre class="programlisting"><a href="gsf-Output-to-unstructured-files.html#GsfOutput">GsfOutput</a>*  gsf_output_iconv_new            (<a href="gsf-Output-to-unstructured-files.html#GsfOutput">GsfOutput</a> *sink,
                                             char const *dst,
                                             char const *src);</pre>
<p>
Adds a reference to <em class="parameter"><code>sink</code></em>.</p>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>sink</code></em>&#160;:</span></td>
<td> The underlying data source.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>dst</code></em>&#160;:</span></td>
<td> The target character set.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>src</code></em>&#160;:</span></td>
<td> The source character set.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td>a new GsfOutput object or NULL.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2543054"></a><h3>
<a name="GsfOutputCsv-struct"></a>GsfOutputCsv</h3>
<a class="indexterm" name="id2543066"></a><pre class="programlisting">typedef struct _GsfOutputCsv GsfOutputCsv;</pre>
<p>

</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2543081"></a><h3>
<a name="gsf-output-csv-write-eol"></a>gsf_output_csv_write_eol ()</h3>
<a class="indexterm" name="id2543094"></a><pre class="programlisting">gboolean    gsf_output_csv_write_eol        (<a href="gsf-Text.html#GsfOutputCsv">GsfOutputCsv</a> *csv);</pre>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>csv</code></em>&#160;:</span></td>
<td>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td>


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2543150"></a><h3>
<a name="gsf-output-csv-write-field"></a>gsf_output_csv_write_field ()</h3>
<a class="indexterm" name="id2543164"></a><pre class="programlisting">gboolean    gsf_output_csv_write_field      (<a href="gsf-Text.html#GsfOutputCsv">GsfOutputCsv</a> *csv,
                                             char const *field,
                                             size_t len);</pre>
<p>

</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>csv</code></em>&#160;:</span></td>
<td>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>field</code></em>&#160;:</span></td>
<td>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>len</code></em>&#160;:</span></td>
<td>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
<td>


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2543263"></a><h3>
<a name="GsfOutputCsvQuotingMode"></a>enum GsfOutputCsvQuotingMode</h3>
<a class="indexterm" name="id2543277"></a><pre class="programlisting">typedef enum {
	GSF_OUTPUT_CSV_QUOTING_MODE_NEVER,
	GSF_OUTPUT_CSV_QUOTING_MODE_AUTO,
	GSF_OUTPUT_CSV_QUOTING_MODE_ALWAYS
} GsfOutputCsvQuotingMode;
</pre>
<p>

</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="property_details"></a><h2>Property Details</h2>
<div class="refsect2" lang="en">
<a name="id2543308"></a><h3>
<a name="GsfOutputIconv--fallback"></a>The "<code class="literal">fallback</code>" property</h3>
<a class="indexterm" name="id2543322"></a><pre class="programlisting">  "fallback"             gchararray            : Read / Write</pre>
<p>
Either NULL or a UTF-8 string (representable in the target encoding)
to convert and output in place of characters that cannot be represented
in the target encoding.  NULL means use \u1234 or \U12345678 format.</p>
<p>

</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2543355"></a><h3>
<a name="GsfOutputIconv--input-charset"></a>The "<code class="literal">input-charset</code>" property</h3>
<a class="indexterm" name="id2543372"></a><pre class="programlisting">  "input-charset"        gchararray            : Read / Write / Construct Only</pre>
<p>The character set to convert from.</p>
<p>Default value: "UTF-8"</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2543399"></a><h3>
<a name="GsfOutputIconv--output-charset"></a>The "<code class="literal">output-charset</code>" property</h3>
<a class="indexterm" name="id2543416"></a><pre class="programlisting">  "output-charset"       gchararray            : Read / Write / Construct Only</pre>
<p>The character set to convert to.</p>
<p>Default value: "UTF-8"</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2543443"></a><h3>
<a name="GsfOutputIconv--sink"></a>The "<code class="literal">sink</code>" property</h3>
<a class="indexterm" name="id2543459"></a><pre class="programlisting">  "sink"                 <a href="gsf-Output-to-unstructured-files.html#GsfOutput">GsfOutput</a>             : Read / Write / Construct Only</pre>
<p>Where the converted data is written.</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2543484"></a><h3>
<a name="GsfOutputCsv--eol"></a>The "<code class="literal">eol</code>" property</h3>
<a class="indexterm" name="id2543498"></a><pre class="programlisting">  "eol"                  gchararray            : Read / Write / Construct</pre>
<p>The end-of-line marker.</p>
<p>Default value: "\n"</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2543525"></a><h3>
<a name="GsfOutputCsv--quote"></a>The "<code class="literal">quote</code>" property</h3>
<a class="indexterm" name="id2543541"></a><pre class="programlisting">  "quote"                gchararray            : Read / Write / Construct</pre>
<p>The string used for quoting fields.</p>
<p>Default value: "\""</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2543567"></a><h3>
<a name="GsfOutputCsv--quoting-mode"></a>The "<code class="literal">quoting-mode</code>" property</h3>
<a class="indexterm" name="id2543583"></a><pre class="programlisting">  "quoting-mode"         <a href="gsf-Text.html#GsfOutputCsvQuotingMode">GsfOutputCsvQuotingMode</a>  : Read / Write / Construct</pre>
<p>When to quote fields.</p>
<p>Default value: GSF_OUTPUT_CSV_QUOTING_MODE_NEVER</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2543611"></a><h3>
<a name="GsfOutputCsv--quoting-triggers"></a>The "<code class="literal">quoting-triggers</code>" property</h3>
<a class="indexterm" name="id2543628"></a><pre class="programlisting">  "quoting-triggers"     gchararray            : Read / Write</pre>
<p>Characters that cause field quoting.</p>
<p>Default value: NULL</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2543655"></a><h3>
<a name="GsfOutputCsv--separator"></a>The "<code class="literal">separator</code>" property</h3>
<a class="indexterm" name="id2543671"></a><pre class="programlisting">  "separator"            gchararray            : Read / Write / Construct</pre>
<p>The field separator.</p>
<p>Default value: ","</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2543698"></a><h3>
<a name="GsfOutputCsv--sink"></a>The "<code class="literal">sink</code>" property</h3>
<a class="indexterm" name="id2543713"></a><pre class="programlisting">  "sink"                 <a href="gsf-Output-to-unstructured-files.html#GsfOutput">GsfOutput</a>             : Read / Write</pre>
<p>Where the compressed data is written.</p>
</div>
</div>
</div>
</body>
</html>