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.
890 lines
32 KiB
890 lines
32 KiB
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
<title>Input from unstructured files</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="io.html" title="Basic Input/Output">
|
|
<link rel="prev" href="io.html" title="Basic Input/Output">
|
|
<link rel="next" href="gsf-Output-to-unstructured-files.html" title="Output to unstructured files">
|
|
<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="io.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
|
|
<td><a accesskey="u" href="io.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-Output-to-unstructured-files.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-Input-from-unstructured-files"></a><div class="titlepage"></div>
|
|
<div class="refnamediv"><table width="100%"><tr>
|
|
<td valign="top">
|
|
<h2><span class="refentrytitle">Input from unstructured files</span></h2>
|
|
<p>Input from unstructured files — </p>
|
|
</td>
|
|
<td valign="top" align="right"></td>
|
|
</tr></table></div>
|
|
<div class="refsynopsisdiv">
|
|
<h2>Synopsis</h2>
|
|
<a name="GsfInput"></a><pre class="synopsis">
|
|
|
|
|
|
|
|
<a href="gsf-Input-from-unstructured-files.html#GsfInput-struct">GsfInput</a>;
|
|
guint8const * <a href="gsf-Input-from-unstructured-files.html#gsf-input-read">gsf_input_read</a> (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *input,
|
|
size_t num_bytes,
|
|
guint8 *optional_buffer);
|
|
<a href="gsf-utils.html#gsf-off-t">gsf_off_t</a> <a href="gsf-Input-from-unstructured-files.html#gsf-input-tell">gsf_input_tell</a> (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *input);
|
|
gboolean <a href="gsf-Input-from-unstructured-files.html#gsf-input-seek">gsf_input_seek</a> (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *input,
|
|
<a href="gsf-utils.html#gsf-off-t">gsf_off_t</a> offset,
|
|
GSeekType whence);
|
|
<a href="gsf-Infile-reading-structed-files.html#GsfInfile">GsfInfile</a>* <a href="gsf-Input-from-unstructured-files.html#gsf-input-container">gsf_input_container</a> (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *input);
|
|
<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a>* <a href="gsf-Input-from-unstructured-files.html#gsf-input-dup">gsf_input_dup</a> (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *input,
|
|
GError **err);
|
|
<a href="gsf-utils.html#gsf-off-t">gsf_off_t</a> <a href="gsf-Input-from-unstructured-files.html#gsf-input-size">gsf_input_size</a> (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *input);
|
|
gboolean <a href="gsf-Input-from-unstructured-files.html#gsf-input-eof">gsf_input_eof</a> (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *input);
|
|
<a href="gsf-utils.html#gsf-off-t">gsf_off_t</a> <a href="gsf-Input-from-unstructured-files.html#gsf-input-remaining">gsf_input_remaining</a> (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *input);
|
|
GQuark <a href="gsf-Input-from-unstructured-files.html#gsf-input-error-id">gsf_input_error_id</a> (void);
|
|
<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a>* <a href="gsf-Input-from-unstructured-files.html#gsf-input-sibling">gsf_input_sibling</a> (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> const *input,
|
|
char const *name,
|
|
GError **err);
|
|
GQuark <a href="gsf-Input-from-unstructured-files.html#gsf-input-error">gsf_input_error</a> (void);
|
|
charconst * <a href="gsf-Input-from-unstructured-files.html#gsf-input-name">gsf_input_name</a> (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *input);
|
|
gboolean <a href="gsf-Input-from-unstructured-files.html#gsf-input-set-name-from-filename">gsf_input_set_name_from_filename</a>
|
|
(<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *input,
|
|
char const *filename);
|
|
<a href="gsf-Input-from-unstructured-files.html#GsfInputProxy">GsfInputProxy</a>;
|
|
<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a>* <a href="gsf-Input-from-unstructured-files.html#gsf-input-proxy-new">gsf_input_proxy_new</a> (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *source);
|
|
<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a>* <a href="gsf-Input-from-unstructured-files.html#gsf-input-proxy-new-section">gsf_input_proxy_new_section</a> (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *source,
|
|
<a href="gsf-utils.html#gsf-off-t">gsf_off_t</a> offset,
|
|
<a href="gsf-utils.html#gsf-off-t">gsf_off_t</a> size);
|
|
|
|
gboolean <a href="gsf-Input-from-unstructured-files.html#gsf-input-copy">gsf_input_copy</a> (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *input,
|
|
<a href="gsf-Output-to-unstructured-files.html#GsfOutput">GsfOutput</a> *output);
|
|
<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a>* <a href="gsf-Input-from-unstructured-files.html#gsf-input-uncompress">gsf_input_uncompress</a> (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *src);
|
|
|
|
gboolean <a href="gsf-Input-from-unstructured-files.html#gsf-input-set-name">gsf_input_set_name</a> (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *input,
|
|
char const *name);
|
|
gboolean <a href="gsf-Input-from-unstructured-files.html#gsf-input-set-container">gsf_input_set_container</a> (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *input,
|
|
<a href="gsf-Infile-reading-structed-files.html#GsfInfile">GsfInfile</a> *container);
|
|
gboolean <a href="gsf-Input-from-unstructured-files.html#gsf-input-set-size">gsf_input_set_size</a> (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *input,
|
|
<a href="gsf-utils.html#gsf-off-t">gsf_off_t</a> size);
|
|
gboolean <a href="gsf-Input-from-unstructured-files.html#gsf-input-seek-emulate">gsf_input_seek_emulate</a> (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *input,
|
|
<a href="gsf-utils.html#gsf-off-t">gsf_off_t</a> pos);
|
|
|
|
</pre>
|
|
</div>
|
|
<div class="refsect1" lang="en">
|
|
<a name="id2515584"></a><h2>Object Hierarchy</h2>
|
|
<pre class="synopsis">
|
|
|
|
GObject
|
|
+----GsfInput
|
|
+----<a href="gsf-Infile-reading-structed-files.html#GsfInfile">GsfInfile</a>
|
|
+----<a href="gsf-Compression.html#GsfInputGZip">GsfInputGZip</a>
|
|
+----<a href="gsf-memory.html#GsfInputMemory">GsfInputMemory</a>
|
|
+----<a href="gsf-Reading-and-Writing-from-local-files-and-directories.html#GsfInputStdio">GsfInputStdio</a>
|
|
+----<a href="gsf-Text.html#GsfInputTextline">GsfInputTextline</a>
|
|
</pre>
|
|
</div>
|
|
<div class="refsect1" lang="en">
|
|
<a name="id2515644"></a><h2>Properties</h2>
|
|
<pre class="synopsis">
|
|
|
|
"<a href="gsf-Input-from-unstructured-files.html#GsfInput--eof">eof</a>" gboolean : Read
|
|
"<a href="gsf-Input-from-unstructured-files.html#GsfInput--name">name</a>" gchararray : Read
|
|
"<a href="gsf-Input-from-unstructured-files.html#GsfInput--position">position</a>" gint64 : Read
|
|
"<a href="gsf-Input-from-unstructured-files.html#GsfInput--remaining">remaining</a>" gint64 : Read
|
|
"<a href="gsf-Input-from-unstructured-files.html#GsfInput--size">size</a>" gint64 : Read
|
|
</pre>
|
|
</div>
|
|
<div class="refsect1" lang="en">
|
|
<a name="id2515738"></a><h2>Description</h2>
|
|
<p>
|
|
|
|
</p>
|
|
</div>
|
|
<div class="refsect1" lang="en">
|
|
<a name="id2515748"></a><h2>Details</h2>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2515753"></a><h3>
|
|
<a name="GsfInput-struct"></a>GsfInput</h3>
|
|
<a class="indexterm" name="id2515764"></a><pre class="programlisting">typedef struct _GsfInput GsfInput;</pre>
|
|
<p>
|
|
|
|
</p>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2515779"></a><h3>
|
|
<a name="gsf-input-read"></a>gsf_input_read ()</h3>
|
|
<a class="indexterm" name="id2515789"></a><pre class="programlisting">guint8const * gsf_input_read (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *input,
|
|
size_t num_bytes,
|
|
guint8 *optional_buffer);</pre>
|
|
<p>
|
|
Read at least <em class="parameter"><code>num_bytes</code></em>. Does not change the current position if there
|
|
is an error. Will only read if the entire amount can be read. Invalidates
|
|
the buffer associated with previous calls to gsf_input_read.</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> the input stream
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><em class="parameter"><code>num_bytes</code></em> :</span></td>
|
|
<td> number of bytes to read
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><em class="parameter"><code>optional_buffer</code></em> :</span></td>
|
|
<td> NULL, or pointer to destination memory area
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
|
|
<td>: pointer to the buffer or NULL if there is an error or 0 bytes are
|
|
requested.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2515907"></a><h3>
|
|
<a name="gsf-input-tell"></a>gsf_input_tell ()</h3>
|
|
<a class="indexterm" name="id2515918"></a><pre class="programlisting"><a href="gsf-utils.html#gsf-off-t">gsf_off_t</a> gsf_input_tell (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *input);</pre>
|
|
<p>
|
|
</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> the input stream
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
|
|
<td>the current offset in the file.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2515976"></a><h3>
|
|
<a name="gsf-input-seek"></a>gsf_input_seek ()</h3>
|
|
<a class="indexterm" name="id2515986"></a><pre class="programlisting">gboolean gsf_input_seek (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *input,
|
|
<a href="gsf-utils.html#gsf-off-t">gsf_off_t</a> offset,
|
|
GSeekType whence);</pre>
|
|
<p>
|
|
</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> the input stream
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><em class="parameter"><code>offset</code></em> :</span></td>
|
|
<td> target offset
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><em class="parameter"><code>whence</code></em> :</span></td>
|
|
<td> determines whether the offset is relative to the beginning or
|
|
the end of the stream, or to the current location.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
|
|
<td>TRUE on error.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2516091"></a><h3>
|
|
<a name="gsf-input-container"></a>gsf_input_container ()</h3>
|
|
<a class="indexterm" name="id2516102"></a><pre class="programlisting"><a href="gsf-Infile-reading-structed-files.html#GsfInfile">GsfInfile</a>* gsf_input_container (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *input);</pre>
|
|
<p>
|
|
</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> the input stream
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
|
|
<td>, but does not add a reference to <em class="parameter"><code>input</code></em>'s container.
|
|
Potentially NULL
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2516167"></a><h3>
|
|
<a name="gsf-input-dup"></a>gsf_input_dup ()</h3>
|
|
<a class="indexterm" name="id2516178"></a><pre class="programlisting"><a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a>* gsf_input_dup (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *input,
|
|
GError **err);</pre>
|
|
<p>
|
|
Duplicates input <em class="parameter"><code>src</code></em> leaving the new one at the same offset.</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> The input to duplicate
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><em class="parameter"><code>err</code></em> :</span></td>
|
|
<td> optionally NULL
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
|
|
<td>: the duplicate, or NULL on error
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2516267"></a><h3>
|
|
<a name="gsf-input-size"></a>gsf_input_size ()</h3>
|
|
<a class="indexterm" name="id2516277"></a><pre class="programlisting"><a href="gsf-utils.html#gsf-off-t">gsf_off_t</a> gsf_input_size (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *input);</pre>
|
|
<p>
|
|
Looks up and caches the number of bytes in the input</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> The input
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
|
|
<td>: the size or -1 on error
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2516338"></a><h3>
|
|
<a name="gsf-input-eof"></a>gsf_input_eof ()</h3>
|
|
<a class="indexterm" name="id2516348"></a><pre class="programlisting">gboolean gsf_input_eof (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *input);</pre>
|
|
<p>
|
|
Are we at the end of the file ?</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> the input
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
|
|
<td>: TRUE if the input is at the eof.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2516409"></a><h3>
|
|
<a name="gsf-input-remaining"></a>gsf_input_remaining ()</h3>
|
|
<a class="indexterm" name="id2516420"></a><pre class="programlisting"><a href="gsf-utils.html#gsf-off-t">gsf_off_t</a> gsf_input_remaining (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *input);</pre>
|
|
<p>
|
|
</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> the input stream
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
|
|
<td>the number of bytes left in the file.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2516480"></a><h3>
|
|
<a name="gsf-input-error-id"></a>gsf_input_error_id ()</h3>
|
|
<a class="indexterm" name="id2516490"></a><pre class="programlisting">GQuark gsf_input_error_id (void);</pre>
|
|
<p>
|
|
</p>
|
|
<p>
|
|
|
|
</p>
|
|
<div class="variablelist"><table border="0">
|
|
<col align="left" valign="top">
|
|
<tbody><tr>
|
|
<td>
|
|
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
|
|
<td>: A utility quark to flag a GError as being an input problem.
|
|
</td>
|
|
</tr></tbody>
|
|
</table></div>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2516530"></a><h3>
|
|
<a name="gsf-input-sibling"></a>gsf_input_sibling ()</h3>
|
|
<a class="indexterm" name="id2516541"></a><pre class="programlisting"><a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a>* gsf_input_sibling (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> const *input,
|
|
char const *name,
|
|
GError **err);</pre>
|
|
<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"><em class="parameter"><code>name</code></em> :</span></td>
|
|
<td>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><em class="parameter"><code>err</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="id2516638"></a><h3>
|
|
<a name="gsf-input-error"></a>gsf_input_error ()</h3>
|
|
<a class="indexterm" name="id2516649"></a><pre class="programlisting">GQuark gsf_input_error (void);</pre>
|
|
<p>
|
|
Deprecated in 1.12.0</p>
|
|
<p>
|
|
|
|
</p>
|
|
<div class="variablelist"><table border="0">
|
|
<col align="left" valign="top">
|
|
<tbody><tr>
|
|
<td>
|
|
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
|
|
<td>: A utility quark to flag a GError as being an input problem.
|
|
</td>
|
|
</tr></tbody>
|
|
</table></div>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2516689"></a><h3>
|
|
<a name="gsf-input-name"></a>gsf_input_name ()</h3>
|
|
<a class="indexterm" name="id2516699"></a><pre class="programlisting">charconst * gsf_input_name (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *input);</pre>
|
|
<p>
|
|
</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> the input stream
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
|
|
<td>
|
|
<em class="parameter"><code>input</code></em>'s name in utf8 form, or NULL if it has no name.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2516765"></a><h3>
|
|
<a name="gsf-input-set-name-from-filename"></a>gsf_input_set_name_from_filename ()</h3>
|
|
<a class="indexterm" name="id2516776"></a><pre class="programlisting">gboolean gsf_input_set_name_from_filename
|
|
(<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *input,
|
|
char const *filename);</pre>
|
|
<p>
|
|
protected.</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> the input stream
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><em class="parameter"><code>filename</code></em> :</span></td>
|
|
<td> the (fs-sys encoded) filename
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
|
|
<td>: TRUE if the assignment was ok.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2516860"></a><h3>
|
|
<a name="GsfInputProxy"></a>GsfInputProxy</h3>
|
|
<a class="indexterm" name="id2516870"></a><pre class="programlisting">typedef struct _GsfInputProxy GsfInputProxy;</pre>
|
|
<p>
|
|
|
|
</p>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2516885"></a><h3>
|
|
<a name="gsf-input-proxy-new"></a>gsf_input_proxy_new ()</h3>
|
|
<a class="indexterm" name="id2516896"></a><pre class="programlisting"><a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a>* gsf_input_proxy_new (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *source);</pre>
|
|
<p>
|
|
This creates a new proxy to the entire, given input source. See
|
|
gsf_input_proxy_new_section for details.</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> The underlying data source.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
|
|
<td>a new input object.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2516958"></a><h3>
|
|
<a name="gsf-input-proxy-new-section"></a>gsf_input_proxy_new_section ()</h3>
|
|
<a class="indexterm" name="id2516969"></a><pre class="programlisting"><a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a>* gsf_input_proxy_new_section (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *source,
|
|
<a href="gsf-utils.html#gsf-off-t">gsf_off_t</a> offset,
|
|
<a href="gsf-utils.html#gsf-off-t">gsf_off_t</a> size);</pre>
|
|
<p>
|
|
This creates a new proxy to a section of the given source. The new
|
|
object will have its own current position, but any operation on it
|
|
can change the source's position.
|
|
</p>
|
|
<p>
|
|
If a proxy to a proxy is created, the intermediate proxy is short-
|
|
circuited.
|
|
</p>
|
|
<p>
|
|
This function will ref the source.</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> The underlying data source.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><em class="parameter"><code>offset</code></em> :</span></td>
|
|
<td> Offset into source for start of section.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><em class="parameter"><code>size</code></em> :</span></td>
|
|
<td> Length of section.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
|
|
<td>a new input object.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2517084"></a><h3>
|
|
<a name="gsf-input-copy"></a>gsf_input_copy ()</h3>
|
|
<a class="indexterm" name="id2517094"></a><pre class="programlisting">gboolean gsf_input_copy (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *input,
|
|
<a href="gsf-Output-to-unstructured-files.html#GsfOutput">GsfOutput</a> *output);</pre>
|
|
<p>
|
|
Copy the contents from <em class="parameter"><code>input</code></em> to <em class="parameter"><code>output</code></em> from their respective
|
|
current positions. So if you want to be sure to copy *everything*,
|
|
make sure to call gsf_input_seek (input, 0, G_SEEK_SET) and
|
|
gsf_output_seek (output, 0, G_SEEK_SET) first, if applicable.</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> a non-null <a href="gsf-Input-from-unstructured-files.html#GsfInput"><span class="type">GsfInput</span></a>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><em class="parameter"><code>output</code></em> :</span></td>
|
|
<td> a non-null <a href="gsf-Output-to-unstructured-files.html#GsfOutput"><span class="type">GsfOutput</span></a>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
|
|
<td>: TRUE on Success
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2517207"></a><h3>
|
|
<a name="gsf-input-uncompress"></a>gsf_input_uncompress ()</h3>
|
|
<a class="indexterm" name="id2517218"></a><pre class="programlisting"><a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a>* gsf_input_uncompress (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *src);</pre>
|
|
<p>
|
|
</p>
|
|
<p>
|
|
|
|
</p>
|
|
<div class="variablelist"><table border="0">
|
|
<col align="left" valign="top">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><em class="parameter"><code>src</code></em> :</span></td>
|
|
<td> stream to be uncompressed.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
|
|
<td> A stream equivalent to the source stream, but uncompressed if
|
|
the source was compressed.
|
|
|
|
This functions takes ownership of the incoming reference and yields a
|
|
new one as its output.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2517281"></a><h3>
|
|
<a name="gsf-input-set-name"></a>gsf_input_set_name ()</h3>
|
|
<a class="indexterm" name="id2517291"></a><pre class="programlisting">gboolean gsf_input_set_name (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *input,
|
|
char const *name);</pre>
|
|
<p>
|
|
protected.</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> the input stream
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><em class="parameter"><code>name</code></em> :</span></td>
|
|
<td> the new name of the stream, or NULL.
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
|
|
<td>: TRUE if the assignment was ok.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2517374"></a><h3>
|
|
<a name="gsf-input-set-container"></a>gsf_input_set_container ()</h3>
|
|
<a class="indexterm" name="id2517384"></a><pre class="programlisting">gboolean gsf_input_set_container (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *input,
|
|
<a href="gsf-Infile-reading-structed-files.html#GsfInfile">GsfInfile</a> *container);</pre>
|
|
<p>
|
|
</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> the input stream
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><em class="parameter"><code>container</code></em> :</span></td>
|
|
<td>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
|
|
<td>: TRUE if the assignment was ok.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2517466"></a><h3>
|
|
<a name="gsf-input-set-size"></a>gsf_input_set_size ()</h3>
|
|
<a class="indexterm" name="id2517477"></a><pre class="programlisting">gboolean gsf_input_set_size (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *input,
|
|
<a href="gsf-utils.html#gsf-off-t">gsf_off_t</a> size);</pre>
|
|
<p>
|
|
</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> the input stream
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><em class="parameter"><code>size</code></em> :</span></td>
|
|
<td> the size of the stream
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
|
|
<td>: TRUE if the assignment was ok.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2517558"></a><h3>
|
|
<a name="gsf-input-seek-emulate"></a>gsf_input_seek_emulate ()</h3>
|
|
<a class="indexterm" name="id2517569"></a><pre class="programlisting">gboolean gsf_input_seek_emulate (<a href="gsf-Input-from-unstructured-files.html#GsfInput">GsfInput</a> *input,
|
|
<a href="gsf-utils.html#gsf-off-t">gsf_off_t</a> pos);</pre>
|
|
<p>
|
|
</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> stream to emulate seek for
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><em class="parameter"><code>pos</code></em> :</span></td>
|
|
<td> absolute position to seek to
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
|
|
<td>: TRUE if the emulation failed.
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table></div>
|
|
</div>
|
|
</div>
|
|
<div class="refsect1" lang="en">
|
|
<a name="id2517653"></a><h2>Properties</h2>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2517659"></a><h3>
|
|
<a name="GsfInput--eof"></a>The "<code class="literal">eof</code>" property</h3>
|
|
<pre class="programlisting"> "eof" gboolean : Read</pre>
|
|
<p>End Of File.</p>
|
|
<p>Default value: FALSE</p>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2517695"></a><h3>
|
|
<a name="GsfInput--name"></a>The "<code class="literal">name</code>" property</h3>
|
|
<pre class="programlisting"> "name" gchararray : Read</pre>
|
|
<p>The Input's Name.</p>
|
|
<p>Default value: NULL</p>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2517731"></a><h3>
|
|
<a name="GsfInput--position"></a>The "<code class="literal">position</code>" property</h3>
|
|
<pre class="programlisting"> "position" gint64 : Read</pre>
|
|
<p>The Output's Current Position.</p>
|
|
<p>Allowed values: >= 0</p>
|
|
<p>Default value: 0</p>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2517772"></a><h3>
|
|
<a name="GsfInput--remaining"></a>The "<code class="literal">remaining</code>" property</h3>
|
|
<pre class="programlisting"> "remaining" gint64 : Read</pre>
|
|
<p>Amount of Data Remaining.</p>
|
|
<p>Allowed values: >= 0</p>
|
|
<p>Default value: 0</p>
|
|
</div>
|
|
<hr>
|
|
<div class="refsect2" lang="en">
|
|
<a name="id2517811"></a><h3>
|
|
<a name="GsfInput--size"></a>The "<code class="literal">size</code>" property</h3>
|
|
<pre class="programlisting"> "size" gint64 : Read</pre>
|
|
<p>The Input's Size.</p>
|
|
<p>Allowed values: >= 0</p>
|
|
<p>Default value: 0</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="io.html"><b><< Basic Input/Output</b></a></td>
|
|
<td align="right"><a accesskey="n" href="gsf-Output-to-unstructured-files.html"><b>Output to unstructured files >></b></a></td>
|
|
</tr></table>
|
|
</body>
|
|
</html>
|