-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgroup_fmt_parser.html
253 lines (170 loc) · 11 KB
/
group_fmt_parser.html
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
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Parser API</title>
<link rel="stylesheet" href="_static/css/redactor.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/doxyrest-pygments.css" type="text/css" />
<link rel="index" title="Index" href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="fmtparser documentation" href="index.html"/>
<link rel="next" title="Utility functions" href="group_fmt_util.html"/>
<link rel="prev" title="Simple API usage example" href="example.html"/>
</head>
<body role="document">
<a href="#" id="js-navigation-toggle" class="navigation-toggle">
<i class="mdi mdi-menu"></i><i class="mdi mdi-close"></i>
</a>
<section class="site-sidebar">
<nav>
<a href="index.html" class="branding-link">
<img src="_static/fmtparser.png" class="logo" />
</a>
<section role="search">
<form action="search.html" method="get" class="site-searchform">
<input type="text" name="q" placeholder="Search in documentation" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</section>
<section class="site-nav">
<p class="caption"><span class="caption-text">Core API</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="example.html">Simple API usage example</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Parser API</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#overview">Overview</a></li>
<li class="toctree-l2"><a class="reference internal" href="#detailed-documentation">Detailed Documentation</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#global-functions">Global Functions</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="group_fmt_util.html">Utility functions</a></li>
<li class="toctree-l1"><a class="reference internal" href="group_fmt_spec.html">Format specifier</a></li>
<li class="toctree-l1"><a class="reference internal" href="group_fmt_spec_api.html">Specifier API</a></li>
</ul>
<p class="caption"><span class="caption-text">Advanced topics</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="global.html">Global Namespace</a></li>
</ul>
</section>
</nav>
</section>
<main class="site-main" role="main">
<nav class="site-breadcrumbs">
<ul>
<li>
<a href="index.html">Documentation</a> /
</li>
<li class="site-breadcrumbs__leaf">Parser API</li>
</ul>
</nav>
<section class="site-content">
<div class="container">
<div class="section" id="parser-api">
<span id="doxid-group-fmt-parser"></span><span id="index-0"></span><h1>Parser API<a class="headerlink" href="#parser-api" title="Permalink to this headline">¶</a></h1>
<div class="toctree-wrapper compound">
</div>
<div class="section" id="overview">
<h2>Overview<a class="headerlink" href="#overview" title="Permalink to this headline">¶</a></h2>
<p>Main functions to parse specifiers from the string. <a class="reference internal" href="#details-group-fmt-parser"><span class="std std-ref">More…</span></a></p>
<pre class="highlight doxyrest-overview-code-block literal-block"><span></span><span class="c1">// global functions</span>
<span class="kt">void</span> <a class="reference internal" href="#doxid-group-fmt-parser-1gac8156e2d605bba5c22cce29e5b0a7109"><span class="std std-ref">fmt_spec_init</span></a><span></span><span class="p">(</span><a class="reference internal" href="struct_fmt_spec.html#doxid-structfmt-spec"><span class="std std-ref">fmt_spec</span></a><span></span><span class="o">*</span> <span class="n">spec</span><span class="p">);</span>
<a class="reference internal" href="enum_fmt_status.html#doxid-fmt-status-8h-1a799588c25c0aa0e01fed1ab04354b0be"><span class="std std-ref">fmt_status</span></a><span></span> <a class="reference internal" href="#doxid-group-fmt-parser-1gaacffa3f20519a9219354e7bf7c53dbfe"><span class="std std-ref">fmt_read_one</span></a><span></span><span class="p">(</span><span class="k">const</span> <a class="reference internal" href="group_fmt_spec.html#doxid-group-fmt-spec-1ga2c58053187af69849e7c6950b590f85f"><span class="std std-ref">fmt_char</span></a><span></span><span class="o">**</span> <span class="n">fmt</span><span class="p">,</span> <a class="reference internal" href="struct_fmt_spec.html#doxid-structfmt-spec"><span class="std std-ref">fmt_spec</span></a><span></span><span class="o">*</span> <span class="n">spec</span><span class="p">);</span>
<a class="reference internal" href="global.html#doxid-fmt-bool-8h-1a17ae672029ff4eef7aaf3332ac3955cb"><span class="std std-ref">fmt_bool</span></a><span></span> <a class="reference internal" href="#doxid-group-fmt-parser-1gafa17e58fa99dac05f1f9fdfc8b081693"><span class="std std-ref">fmt_read_is_ok</span></a><span></span><span class="p">(</span><a class="reference internal" href="enum_fmt_status.html#doxid-fmt-status-8h-1a799588c25c0aa0e01fed1ab04354b0be"><span class="std std-ref">fmt_status</span></a><span></span> <span class="n">status</span><span class="p">);</span></pre>
</div>
<div class="section" id="detailed-documentation">
<span id="details-group-fmt-parser"></span><h2>Detailed Documentation<a class="headerlink" href="#detailed-documentation" title="Permalink to this headline">¶</a></h2>
<p>Main functions to parse specifiers from the string.</p>
<div class="section" id="global-functions">
<h3>Global Functions<a class="headerlink" href="#global-functions" title="Permalink to this headline">¶</a></h3>
<pre class="highlight doxyrest-title-code-block literal-block" id="doxid-group-fmt-parser-1gac8156e2d605bba5c22cce29e5b0a7109"><span id="index-1"></span><span></span><span class="kt">void</span> <span class="n">fmt_spec_init</span><span class="p">(</span><a class="reference internal" href="struct_fmt_spec.html#doxid-structfmt-spec"><span class="std std-ref">fmt_spec</span></a><span></span><span class="o">*</span> <span class="n">spec</span><span class="p">)</span></pre>
<p>Initialize format specifier</p>
<p class="rubric">Parameters:</p>
<table class="colwidths-given docutils align-default">
<colgroup>
<col style="width: 20%" />
<col style="width: 80%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p>spec</p></td>
<td><p>Pointer to specifier</p></td>
</tr>
</tbody>
</table>
<pre class="highlight doxyrest-title-code-block literal-block" id="doxid-group-fmt-parser-1gaacffa3f20519a9219354e7bf7c53dbfe"><span id="index-2"></span><a class="reference internal" href="enum_fmt_status.html#doxid-fmt-status-8h-1a799588c25c0aa0e01fed1ab04354b0be"><span class="std std-ref">fmt_status</span></a><span></span> <span class="n">fmt_read_one</span><span class="p">(</span><span class="k">const</span> <a class="reference internal" href="group_fmt_spec.html#doxid-group-fmt-spec-1ga2c58053187af69849e7c6950b590f85f"><span class="std std-ref">fmt_char</span></a><span></span><span class="o">**</span> <span class="n">fmt</span><span class="p">,</span> <a class="reference internal" href="struct_fmt_spec.html#doxid-structfmt-spec"><span class="std std-ref">fmt_spec</span></a><span></span><span class="o">*</span> <span class="n">spec</span><span class="p">)</span></pre>
<p>Read one specifier from the format string</p>
<p class="rubric">Parameters:</p>
<table class="colwidths-given docutils align-default">
<colgroup>
<col style="width: 20%" />
<col style="width: 80%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p>fmt</p></td>
<td><p>The format string</p></td>
</tr>
<tr class="row-even"><td><p>spec</p></td>
<td><p>Pointer to specifier</p></td>
</tr>
</tbody>
</table>
<p class="rubric">Returns:</p>
<p>Status code</p>
<pre class="highlight doxyrest-title-code-block literal-block" id="doxid-group-fmt-parser-1gafa17e58fa99dac05f1f9fdfc8b081693"><span id="index-3"></span><a class="reference internal" href="global.html#doxid-fmt-bool-8h-1a17ae672029ff4eef7aaf3332ac3955cb"><span class="std std-ref">fmt_bool</span></a><span></span> <span class="n">fmt_read_is_ok</span><span class="p">(</span><a class="reference internal" href="enum_fmt_status.html#doxid-fmt-status-8h-1a799588c25c0aa0e01fed1ab04354b0be"><span class="std std-ref">fmt_status</span></a><span></span> <span class="n">status</span><span class="p">)</span></pre>
<p>Check that read is OK and specifier parsing can be continued</p>
<p class="rubric">Parameters:</p>
<table class="colwidths-given docutils align-default">
<colgroup>
<col style="width: 20%" />
<col style="width: 80%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p>status</p></td>
<td><p>Status code (from <code class="docutils literal notranslate"><a class="reference internal" href="#doxid-group-fmt-parser-1gaacffa3f20519a9219354e7bf7c53dbfe"><span class="std std-ref"><span class="pre">fmt_read_one()</span></span></a></code>)</p></td>
</tr>
</tbody>
</table>
<p class="rubric">Returns:</p>
<p><code class="docutils literal notranslate"><span class="pre">FMT_TRUE</span></code> if read can be continued, <code class="docutils literal notranslate"><span class="pre">FMT_FALSE</span></code> otherwise</p>
</div>
</div>
</div>
</div>
</section>
<nav class="site-bottom-navigation" role="navigation">
<a href="group_fmt_util.html" class="btn btn--primary btn--next right"
title="Utility functions" accesskey="n">
Next
</a>
<a href="example.html" class="btn btn--primary btn--prev"
title="Simple API usage example" accesskey="p">
Previous
</a>
</nav>
<div class="source-link">
</div>
</main>
<footer class="site-footer">
<div class="container">
<div role="contentinfo">
<p>
© Copyright 2021, Maxim Menshikov.
</p>
</div>
<p>Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/testthedocs/sphinx_redactor_theme">theme</a>
provided by <a href="https://testthedocs.org">TestTheDocs</a>.
</div>
</footer>
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script src="_static/target-highlight.js"></script>
<script type="text/javascript" src="_static/js/theme-min.js"></script>
</body>
</html>