mirror of https://github.com/Gnucash/gnucash
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
345 lines
12 KiB
345 lines
12 KiB
<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.4 (XML mode)">
|
|
<link rel="stylesheet" href="style.css" type="text/css">
|
|
<link rel="part" href="into.html" title="Part I. GSF Overview">
|
|
<link rel="part" href="api.html" title="Part II. 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" 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></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">Text</span></h2>
|
|
<p>Text — </p>
|
|
</td>
|
|
<td valign="top" align="right"></td>
|
|
</tr></table></div>
|
|
<div class="refsynopsisdiv">
|
|
<h2>Synopsis</h2>
|
|
<a name="GsfInputTextline"></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> *input);
|
|
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> *input);
|
|
<a href="gsf-Text.html#GsfOutputIconv">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">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="id2537757"></a><h2>Object Hierarchy</h2>
|
|
<pre class="synopsis">
|
|
|
|
GObject
|
|
+----<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a>
|
|
+----GsfInputTextline
|
|
</pre>
|
|
</div>
|
|
<div class="refsect1" lang="en">
|
|
<a name="id2537783"></a><h2>Description</h2>
|
|
<p>
|
|
|
|
</p>
|
|
</div>
|
|
<div class="refsect1" lang="en">
|
|
<a name="id2537793"></a><h2>Details</h2>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2537799"></a><h3>
|
|
<a name="GsfInputTextline-struct"></a>GsfInputTextline</h3>
|
|
<a class="indexterm" name="id2537810"></a><pre class="programlisting">typedef struct _GsfInputTextline GsfInputTextline;</pre>
|
|
<p>
|
|
|
|
</p>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2537826"></a><h3>
|
|
<a name="gsf-input-textline-new"></a>gsf_input_textline_new ()</h3>
|
|
<a class="indexterm" name="id2537836"></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>
|
|
NOTE : adds a reference to <em class="parameter"><code>source</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>source</code></em> :</span></td>
|
|
<td> in some combination of ascii and utf8
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
|
|
<td>a new file or NULL.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2537902"></a><h3>
|
|
<a name="gsf-input-textline-ascii-gets"></a>gsf_input_textline_ascii_gets ()</h3>
|
|
<a class="indexterm" name="id2537913"></a><pre class="programlisting">unsigned char* gsf_input_textline_ascii_gets
|
|
(<a href="gsf-Text.html#GsfInputTextline">GsfInputTextline</a> *input);</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>input</code></em> :</span></td>
|
|
<td>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
|
|
<td>the string read, or NULL on eof.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2537978"></a><h3>
|
|
<a name="gsf-input-textline-utf8-gets"></a>gsf_input_textline_utf8_gets ()</h3>
|
|
<a class="indexterm" name="id2537989"></a><pre class="programlisting">guint8* gsf_input_textline_utf8_gets (<a href="gsf-Text.html#GsfInputTextline">GsfInputTextline</a> *input);</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>input</code></em> :</span></td>
|
|
<td>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
|
|
<td>the string read, or NULL on eof.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2538053"></a><h3>
|
|
<a name="GsfOutputIconv"></a>GsfOutputIconv</h3>
|
|
<a class="indexterm" name="id2538063"></a><pre class="programlisting">typedef struct _GsfOutputIconv GsfOutputIconv;</pre>
|
|
<p>
|
|
|
|
</p>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2538079"></a><h3>
|
|
<a name="gsf-output-iconv-new"></a>gsf_output_iconv_new ()</h3>
|
|
<a class="indexterm" name="id2538089"></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> :</span></td>
|
|
<td> The underlying data source.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><em class="parameter"><code>dst</code></em> :</span></td>
|
|
<td> The target character set.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><em class="parameter"><code>src</code></em> :</span></td>
|
|
<td> The source character set.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
|
|
<td>a new GsfOutput object or NULL.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2538199"></a><h3>
|
|
<a name="GsfOutputCsv"></a>GsfOutputCsv</h3>
|
|
<a class="indexterm" name="id2538210"></a><pre class="programlisting">typedef struct {
|
|
GsfOutput output;
|
|
|
|
GsfOutput *sink;
|
|
|
|
char *quote;
|
|
size_t quote_len;
|
|
GsfOutputCsvQuotingMode quoting_mode;
|
|
char *quoting_triggers;
|
|
|
|
char *eol;
|
|
size_t eol_len;
|
|
char *separator;
|
|
size_t separator_len;
|
|
gboolean fields_on_line;
|
|
|
|
GString *buf;
|
|
} GsfOutputCsv;
|
|
</pre>
|
|
<p>
|
|
|
|
</p>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2538230"></a><h3>
|
|
<a name="gsf-output-csv-write-eol"></a>gsf_output_csv_write_eol ()</h3>
|
|
<a class="indexterm" name="id2538240"></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> :</span></td>
|
|
<td>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
|
|
<td>
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2538296"></a><h3>
|
|
<a name="gsf-output-csv-write-field"></a>gsf_output_csv_write_field ()</h3>
|
|
<a class="indexterm" name="id2538308"></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> :</span></td>
|
|
<td>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><em class="parameter"><code>field</code></em> :</span></td>
|
|
<td>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><em class="parameter"><code>len</code></em> :</span></td>
|
|
<td>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
|
|
<td>
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2538406"></a><h3>
|
|
<a name="GsfOutputCsvQuotingMode"></a>enum GsfOutputCsvQuotingMode</h3>
|
|
<a class="indexterm" name="id2538418"></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>
|
|
<table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle">
|
|
<td align="left"><a accesskey="p" href="parsers.html"><b><< Stream Parsers</b></a></td>
|
|
<td align="right"><a accesskey="n" href="gsf-XML-and-libxml.html"><b>XML and libxml >></b></a></td>
|
|
</tr></table>
|
|
</body>
|
|
</html>
|