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
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>section-locator: Raptor RDF Syntax Library Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="Raptor RDF Syntax Library Manual">
<link rel="up" href="reference-manual.html" title="Part II. Raptor Reference Manual">
<link rel="prev" href="raptor2-section-iostream.html" title="section-iostream">
<link rel="next" href="raptor2-section-parser.html" title="section-parser">
<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</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="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
<a href="#raptor2-section-locator.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="reference-manual.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="raptor2-section-iostream.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="raptor2-section-parser.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="raptor2-section-locator"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="raptor2-section-locator.top_of_page"></a>section-locator</span></h2>
<p>section-locator</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="raptor2-section-locator.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="raptor2-section-locator.html#raptor-locator-print" title="raptor_locator_print ()">raptor_locator_print</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="raptor2-section-locator.html#raptor-locator-format" title="raptor_locator_format ()">raptor_locator_format</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="raptor2-section-locator.html#raptor-locator-line" title="raptor_locator_line ()">raptor_locator_line</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="raptor2-section-locator.html#raptor-locator-column" title="raptor_locator_column ()">raptor_locator_column</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="raptor2-section-locator.html#raptor-locator-byte" title="raptor_locator_byte ()">raptor_locator_byte</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="raptor2-section-locator.html#raptor-locator-file" title="raptor_locator_file ()">raptor_locator_file</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="raptor2-section-locator.html#raptor-locator-uri" title="raptor_locator_uri ()">raptor_locator_uri</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="raptor2-section-locator.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="other_proto_type">
<col class="other_proto_name">
</colgroup>
<tbody><tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="raptor2-section-locator.html#raptor-locator" title="raptor_locator">raptor_locator</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="raptor2-section-locator.description"></a><h2>Description</h2>
</div>
<div class="refsect1">
<a name="raptor2-section-locator.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="raptor-locator-print"></a><h3>raptor_locator_print ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
raptor_locator_print (<em class="parameter"><code><a class="link" href="raptor2-section-locator.html#raptor-locator" title="raptor_locator"><span class="type">raptor_locator</span></a> *locator</code></em>,
<em class="parameter"><code><span class="type">FILE</span> *stream</code></em>);</pre>
<p>Print a raptor locator to a stream.</p>
<div class="refsect3">
<a name="raptor-locator-print.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>locator</p></td>
<td class="parameter_description"><p><a class="link" href="raptor2-section-locator.html#raptor-locator" title="raptor_locator"><span class="type">raptor_locator</span></a> to print</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>stream</p></td>
<td class="parameter_description"><p>stream to print to</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-locator-print.returns"></a><h4>Returns</h4>
<p> non-0 on failure</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-locator-format"></a><h3>raptor_locator_format ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
raptor_locator_format (<em class="parameter"><code><span class="type">char</span> *buffer</code></em>,
<em class="parameter"><code><span class="type">size_t</span> length</code></em>,
<em class="parameter"><code><a class="link" href="raptor2-section-locator.html#raptor-locator" title="raptor_locator"><span class="type">raptor_locator</span></a> *locator</code></em>);</pre>
<p>Format a raptor locator as a string.</p>
<p>If buffer is NULL or <em class="parameter"><code>length</code></em>
is insufficient for the size of
the locator, returns the number of additional bytes required
in the buffer to write the locator. Writes a terminating '\0'.</p>
<div class="refsect3">
<a name="raptor-locator-format.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>buffer to store format</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>size of buffer (excluding NUL)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>locator</p></td>
<td class="parameter_description"><p><a class="link" href="raptor2-section-locator.html#raptor-locator" title="raptor_locator"><span class="type">raptor_locator</span></a> to format</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-locator-format.returns"></a><h4>Returns</h4>
<p> 0 on success, >0 if additional bytes required in buffer, <0 on failure</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-locator-line"></a><h3>raptor_locator_line ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
raptor_locator_line (<em class="parameter"><code><a class="link" href="raptor2-section-locator.html#raptor-locator" title="raptor_locator"><span class="type">raptor_locator</span></a> *locator</code></em>);</pre>
<p>Get line number from locator.</p>
<div class="refsect3">
<a name="raptor-locator-line.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>locator</p></td>
<td class="parameter_description"><p>locator</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-locator-line.returns"></a><h4>Returns</h4>
<p> integer line number, or -1 if there is no line number available</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-locator-column"></a><h3>raptor_locator_column ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
raptor_locator_column (<em class="parameter"><code><a class="link" href="raptor2-section-locator.html#raptor-locator" title="raptor_locator"><span class="type">raptor_locator</span></a> *locator</code></em>);</pre>
<p>Get column number from locator.</p>
<div class="refsect3">
<a name="raptor-locator-column.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>locator</p></td>
<td class="parameter_description"><p>locator</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-locator-column.returns"></a><h4>Returns</h4>
<p> integer column number, or -1 if there is no column number available</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-locator-byte"></a><h3>raptor_locator_byte ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
raptor_locator_byte (<em class="parameter"><code><a class="link" href="raptor2-section-locator.html#raptor-locator" title="raptor_locator"><span class="type">raptor_locator</span></a> *locator</code></em>);</pre>
<p>Get the locator byte offset from locator.</p>
<div class="refsect3">
<a name="raptor-locator-byte.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>locator</p></td>
<td class="parameter_description"><p>locator</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-locator-byte.returns"></a><h4>Returns</h4>
<p> integer byte number, or -1 if there is no byte offset available</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-locator-file"></a><h3>raptor_locator_file ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
raptor_locator_file (<em class="parameter"><code><a class="link" href="raptor2-section-locator.html#raptor-locator" title="raptor_locator"><span class="type">raptor_locator</span></a> *locator</code></em>);</pre>
<p>Get file name from locator.</p>
<div class="refsect3">
<a name="raptor-locator-file.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>locator</p></td>
<td class="parameter_description"><p>locator</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-locator-file.returns"></a><h4>Returns</h4>
<p> string file name, or NULL if there is no filename available</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="raptor-locator-uri"></a><h3>raptor_locator_uri ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
raptor_locator_uri (<em class="parameter"><code><a class="link" href="raptor2-section-locator.html#raptor-locator" title="raptor_locator"><span class="type">raptor_locator</span></a> *locator</code></em>);</pre>
<p>Get URI from locator.</p>
<p>Returns a pointer to a shared string version of the URI in
the locator. This must be copied if it is needed.</p>
<div class="refsect3">
<a name="raptor-locator-uri.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>locator</p></td>
<td class="parameter_description"><p>locator</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="raptor-locator-uri.returns"></a><h4>Returns</h4>
<p> string URI, or NULL if there is no URI available</p>
</div>
</div>
</div>
<div class="refsect1">
<a name="raptor2-section-locator.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="raptor-locator"></a><h3>raptor_locator</h3>
<pre class="programlisting">typedef struct {
raptor_uri *uri;
const char *file;
int line;
int column;
int byte;
} raptor_locator;
</pre>
<p>Location information for an error, warning or information message.</p>
<div class="refsect3">
<a name="raptor-locator.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><a class="link" href="raptor2-section-uri.html#raptor-uri" title="raptor_uri"><span class="type">raptor_uri</span></a> *<em class="structfield"><code><a name="raptor-locator.uri"></a>uri</code></em>;</p></td>
<td class="struct_member_description"><p>URI of location (or NULL)</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p>const <span class="type">char</span> *<em class="structfield"><code><a name="raptor-locator.file"></a>file</code></em>;</p></td>
<td class="struct_member_description"><p>Filename of location (or NULL)</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><span class="type">int</span> <em class="structfield"><code><a name="raptor-locator.line"></a>line</code></em>;</p></td>
<td class="struct_member_description"><p>Line number of location (or <0 for no line)</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><span class="type">int</span> <em class="structfield"><code><a name="raptor-locator.column"></a>column</code></em>;</p></td>
<td class="struct_member_description"><p>Column number of location (or <0 for no column)</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><span class="type">int</span> <em class="structfield"><code><a name="raptor-locator.byte"></a>byte</code></em>;</p></td>
<td class="struct_member_description"><p>Byte number of location (or <0 for no byte)</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>
|