This file is indexed.

/usr/share/gtk-doc/html/libg3d/libg3d-iff.html is in libg3d-doc 0.0.8-17ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>iff</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="libg3d Reference Manual">
<link rel="up" href="ch02.html" title="Plugin interface">
<link rel="prev" href="libg3d-stream.html" title="stream">
<link rel="next" href="libg3d-read.html" title="read">
<meta name="generator" content="GTK-Doc V1.18 (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="2">
<tr valign="middle">
<td><a accesskey="p" href="libg3d-stream.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch02.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">libg3d Reference Manual</th>
<td><a accesskey="n" href="libg3d-read.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#libg3d-iff.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#libg3d-iff.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="libg3d-iff"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libg3d-iff.top_of_page"></a>iff</span></h2>
<p>iff — IFF file helper functions</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="libg3d-iff.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;g3d/iff.h&gt;

#define             <a class="link" href="libg3d-iff.html#G3D-IFF-PAD1:CAPS" title="G3D_IFF_PAD1">G3D_IFF_PAD1</a>
#define             <a class="link" href="libg3d-iff.html#G3D-IFF-PAD2:CAPS" title="G3D_IFF_PAD2">G3D_IFF_PAD2</a>
#define             <a class="link" href="libg3d-iff.html#G3D-IFF-PAD4:CAPS" title="G3D_IFF_PAD4">G3D_IFF_PAD4</a>
#define             <a class="link" href="libg3d-iff.html#G3D-IFF-PAD8:CAPS" title="G3D_IFF_PAD8">G3D_IFF_PAD8</a>
#define             <a class="link" href="libg3d-iff.html#G3D-IFF-LE:CAPS" title="G3D_IFF_LE">G3D_IFF_LE</a>
#define             <a class="link" href="libg3d-iff.html#G3D-IFF-LEN16:CAPS" title="G3D_IFF_LEN16">G3D_IFF_LEN16</a>
#define             <a class="link" href="libg3d-iff.html#G3D-IFF-SUBCHUNK-LEN16:CAPS" title="G3D_IFF_SUBCHUNK_LEN16">G3D_IFF_SUBCHUNK_LEN16</a>
#define             <a class="link" href="libg3d-iff.html#G3D-IFF-MKID:CAPS" title="G3D_IFF_MKID()">G3D_IFF_MKID</a>                        (a,
                                                         b,
                                                         c,
                                                         d)
<span class="returnvalue">gboolean</span>            <a class="link" href="libg3d-iff.html#g3d-iff-check" title="g3d_iff_check ()">g3d_iff_check</a>                       (<em class="parameter"><code><a class="link" href="libg3d-stream.html#G3DStream" title="G3DStream"><span class="type">G3DStream</span></a> *stream</code></em>,
                                                         <em class="parameter"><code><span class="type">guint32</span> *id</code></em>,
                                                         <em class="parameter"><code><span class="type">gsize</span> *len</code></em>);
<span class="returnvalue">gsize</span>               <a class="link" href="libg3d-iff.html#g3d-iff-read-chunk" title="g3d_iff_read_chunk ()">g3d_iff_read_chunk</a>                  (<em class="parameter"><code><a class="link" href="libg3d-stream.html#G3DStream" title="G3DStream"><span class="type">G3DStream</span></a> *stream</code></em>,
                                                         <em class="parameter"><code><span class="type">guint32</span> *id</code></em>,
                                                         <em class="parameter"><code><span class="type">gsize</span> *len</code></em>,
                                                         <em class="parameter"><code><span class="type">guint32</span> flags</code></em>);
<span class="returnvalue">gpointer</span>            <a class="link" href="libg3d-iff.html#g3d-iff-handle-chunk" title="g3d_iff_handle_chunk ()">g3d_iff_handle_chunk</a>                (<em class="parameter"><code><a class="link" href="libg3d-iff.html#G3DIffGlobal" title="G3DIffGlobal"><span class="type">G3DIffGlobal</span></a> *global</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libg3d-iff.html#G3DIffLocal" title="G3DIffLocal"><span class="type">G3DIffLocal</span></a> *plocal</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libg3d-iff.html#G3DIffChunkInfo" title="G3DIffChunkInfo"><span class="type">G3DIffChunkInfo</span></a> *chunks</code></em>,
                                                         <em class="parameter"><code><span class="type">guint32</span> flags</code></em>);
<span class="returnvalue">gboolean</span>            <a class="link" href="libg3d-iff.html#g3d-iff-chunk-matches" title="g3d_iff_chunk_matches ()">g3d_iff_chunk_matches</a>               (<em class="parameter"><code><span class="type">guint32</span> id</code></em>,
                                                         <em class="parameter"><code><span class="type">gchar</span> *tid</code></em>);
<span class="returnvalue">gboolean</span>            <a class="link" href="libg3d-iff.html#g3d-iff-read-ctnr" title="g3d_iff_read_ctnr ()">g3d_iff_read_ctnr</a>                   (<em class="parameter"><code><a class="link" href="libg3d-iff.html#G3DIffGlobal" title="G3DIffGlobal"><span class="type">G3DIffGlobal</span></a> *global</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libg3d-iff.html#G3DIffLocal" title="G3DIffLocal"><span class="type">G3DIffLocal</span></a> *local</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libg3d-iff.html#G3DIffChunkInfo" title="G3DIffChunkInfo"><span class="type">G3DIffChunkInfo</span></a> *chunks</code></em>,
                                                         <em class="parameter"><code><span class="type">guint32</span> flags</code></em>);
<span class="returnvalue">gchar</span> *             <a class="link" href="libg3d-iff.html#g3d-iff-id-to-text" title="g3d_iff_id_to_text ()">g3d_iff_id_to_text</a>                  (<em class="parameter"><code><span class="type">guint32</span> id</code></em>);
<span class="returnvalue">FILE</span> *              <a class="link" href="libg3d-iff.html#g3d-iff-open" title="g3d_iff_open ()">g3d_iff_open</a>                        (<em class="parameter"><code>const <span class="type">gchar</span> *filename</code></em>,
                                                         <em class="parameter"><code><span class="type">guint32</span> *id</code></em>,
                                                         <em class="parameter"><code><span class="type">guint32</span> *len</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="libg3d-iff.html#g3d-iff-readchunk" title="g3d_iff_readchunk ()">g3d_iff_readchunk</a>                   (<em class="parameter"><code><span class="type">FILE</span> *f</code></em>,
                                                         <em class="parameter"><code><span class="type">guint32</span> *id</code></em>,
                                                         <em class="parameter"><code><span class="type">guint32</span> *len</code></em>,
                                                         <em class="parameter"><code><span class="type">guint32</span> flags</code></em>);
<span class="returnvalue">gboolean</span>            (<a class="link" href="libg3d-iff.html#G3DIffChunkCallback" title="G3DIffChunkCallback ()">*G3DIffChunkCallback</a>)              (<em class="parameter"><code><a class="link" href="libg3d-iff.html#G3DIffGlobal" title="G3DIffGlobal"><span class="type">G3DIffGlobal</span></a> *global</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libg3d-iff.html#G3DIffLocal" title="G3DIffLocal"><span class="type">G3DIffLocal</span></a> *local</code></em>);
#define             <a class="link" href="libg3d-iff.html#g3d-iff-chunk-callback" title="g3d_iff_chunk_callback">g3d_iff_chunk_callback</a>
                    <a class="link" href="libg3d-iff.html#G3DIffChunkInfo" title="G3DIffChunkInfo">G3DIffChunkInfo</a>;
#define             <a class="link" href="libg3d-iff.html#g3d-iff-chunk-info" title="g3d_iff_chunk_info">g3d_iff_chunk_info</a>
                    <a class="link" href="libg3d-iff.html#G3DIffGlobal" title="G3DIffGlobal">G3DIffGlobal</a>;
#define             <a class="link" href="libg3d-iff.html#g3d-iff-gdata" title="g3d_iff_gdata">g3d_iff_gdata</a>
                    <a class="link" href="libg3d-iff.html#G3DIffLocal" title="G3DIffLocal">G3DIffLocal</a>;
#define             <a class="link" href="libg3d-iff.html#g3d-iff-ldata" title="g3d_iff_ldata">g3d_iff_ldata</a>
</pre>
</div>
<div class="refsect1">
<a name="libg3d-iff.description"></a><h2>Description</h2>
<p>
These are helper functions to read data from the Interchange File Format
(IFF).
</p>
</div>
<div class="refsect1">
<a name="libg3d-iff.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="G3D-IFF-PAD1:CAPS"></a><h3>G3D_IFF_PAD1</h3>
<pre class="programlisting">#define G3D_IFF_PAD1   0x01
</pre>
<p>
No padding is done after chunks.
</p>
</div>
<hr>
<div class="refsect2">
<a name="G3D-IFF-PAD2:CAPS"></a><h3>G3D_IFF_PAD2</h3>
<pre class="programlisting">#define G3D_IFF_PAD2   0x02
</pre>
<p>
Chunks are 2-byte aligned
</p>
</div>
<hr>
<div class="refsect2">
<a name="G3D-IFF-PAD4:CAPS"></a><h3>G3D_IFF_PAD4</h3>
<pre class="programlisting">#define G3D_IFF_PAD4   0x04
</pre>
<p>
Chunks are 4-byte aligned
</p>
</div>
<hr>
<div class="refsect2">
<a name="G3D-IFF-PAD8:CAPS"></a><h3>G3D_IFF_PAD8</h3>
<pre class="programlisting">#define G3D_IFF_PAD8   0x08
</pre>
<p>
Chunks are 8-byte aligned
</p>
</div>
<hr>
<div class="refsect2">
<a name="G3D-IFF-LE:CAPS"></a><h3>G3D_IFF_LE</h3>
<pre class="programlisting">#define G3D_IFF_LE               0x40 /* little endian */
</pre>
<p>
The file has little-endian data.
</p>
</div>
<hr>
<div class="refsect2">
<a name="G3D-IFF-LEN16:CAPS"></a><h3>G3D_IFF_LEN16</h3>
<pre class="programlisting">#define G3D_IFF_LEN16            0x20
</pre>
<p>
All chunks have 16-bit sizes.
</p>
</div>
<hr>
<div class="refsect2">
<a name="G3D-IFF-SUBCHUNK-LEN16:CAPS"></a><h3>G3D_IFF_SUBCHUNK_LEN16</h3>
<pre class="programlisting">#define G3D_IFF_SUBCHUNK_LEN16   0x10
</pre>
<p>
All chunks except the toplevel ones have 16-bit sizes.
</p>
</div>
<hr>
<div class="refsect2">
<a name="G3D-IFF-MKID:CAPS"></a><h3>G3D_IFF_MKID()</h3>
<pre class="programlisting">#define             G3D_IFF_MKID(a,b,c,d)</pre>
<p>
Generate an IFF chunk identifier from character representation, e.g.
G3D_IFF_MKID('F','O','R','M').
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
<td>first byte</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
<td>second byte</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>third byte</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>d</code></em> :</span></p></td>
<td>fourth byte</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>unsigned integer identifier.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g3d-iff-check"></a><h3>g3d_iff_check ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>            g3d_iff_check                       (<em class="parameter"><code><a class="link" href="libg3d-stream.html#G3DStream" title="G3DStream"><span class="type">G3DStream</span></a> *stream</code></em>,
                                                         <em class="parameter"><code><span class="type">guint32</span> *id</code></em>,
                                                         <em class="parameter"><code><span class="type">gsize</span> *len</code></em>);</pre>
<p>
Checks a stream for a valid IFF signature and reads the top level container.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
<td>stream containing IFF file to check</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
<td>top level ID (out)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>length of top level container (out)</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>TRUE on success (valid IFF), FALSE else</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g3d-iff-read-chunk"></a><h3>g3d_iff_read_chunk ()</h3>
<pre class="programlisting"><span class="returnvalue">gsize</span>               g3d_iff_read_chunk                  (<em class="parameter"><code><a class="link" href="libg3d-stream.html#G3DStream" title="G3DStream"><span class="type">G3DStream</span></a> *stream</code></em>,
                                                         <em class="parameter"><code><span class="type">guint32</span> *id</code></em>,
                                                         <em class="parameter"><code><span class="type">gsize</span> *len</code></em>,
                                                         <em class="parameter"><code><span class="type">guint32</span> flags</code></em>);</pre>
<p>
Reads one chunk header from an IFF file.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
<td>stream to read from</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
<td>ID of chunk (out)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>length of chunk (excluding header) (out)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td>flags</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>real length of chunk including header and possible padding byte</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g3d-iff-handle-chunk"></a><h3>g3d_iff_handle_chunk ()</h3>
<pre class="programlisting"><span class="returnvalue">gpointer</span>            g3d_iff_handle_chunk                (<em class="parameter"><code><a class="link" href="libg3d-iff.html#G3DIffGlobal" title="G3DIffGlobal"><span class="type">G3DIffGlobal</span></a> *global</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libg3d-iff.html#G3DIffLocal" title="G3DIffLocal"><span class="type">G3DIffLocal</span></a> *plocal</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libg3d-iff.html#G3DIffChunkInfo" title="G3DIffChunkInfo"><span class="type">G3DIffChunkInfo</span></a> *chunks</code></em>,
                                                         <em class="parameter"><code><span class="type">guint32</span> flags</code></em>);</pre>
<p>
Handle an IFF chunk based on chunk description.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>global</code></em> :</span></p></td>
<td>global data</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>plocal</code></em> :</span></p></td>
<td>local data of parent chunk, must not be NULL</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>chunks</code></em> :</span></p></td>
<td>chunk description list</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td>IFF flags</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>level object for siblings, may be NULL.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g3d-iff-chunk-matches"></a><h3>g3d_iff_chunk_matches ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>            g3d_iff_chunk_matches               (<em class="parameter"><code><span class="type">guint32</span> id</code></em>,
                                                         <em class="parameter"><code><span class="type">gchar</span> *tid</code></em>);</pre>
<p>
Check whether <em class="parameter"><code>id</code></em> and <em class="parameter"><code>tid</code></em> match.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
<td>IFF identifier</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>tid</code></em> :</span></p></td>
<td>textual representation of identifier</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>TRUE on match, FALSE else.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g3d-iff-read-ctnr"></a><h3>g3d_iff_read_ctnr ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>            g3d_iff_read_ctnr                   (<em class="parameter"><code><a class="link" href="libg3d-iff.html#G3DIffGlobal" title="G3DIffGlobal"><span class="type">G3DIffGlobal</span></a> *global</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libg3d-iff.html#G3DIffLocal" title="G3DIffLocal"><span class="type">G3DIffLocal</span></a> *local</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libg3d-iff.html#G3DIffChunkInfo" title="G3DIffChunkInfo"><span class="type">G3DIffChunkInfo</span></a> *chunks</code></em>,
                                                         <em class="parameter"><code><span class="type">guint32</span> flags</code></em>);</pre>
<p>
Read subchunks in current chunk and handle them appropriately.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>global</code></em> :</span></p></td>
<td>global data</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>local</code></em> :</span></p></td>
<td>local data of current chunk, must not be NULL</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>chunks</code></em> :</span></p></td>
<td>chunk description list</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td>IFF flags</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>TRUE on success, FALSE else.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g3d-iff-id-to-text"></a><h3>g3d_iff_id_to_text ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *             g3d_iff_id_to_text                  (<em class="parameter"><code><span class="type">guint32</span> id</code></em>);</pre>
<p>
Get the text representation of an IFF chunk identifier.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
<td>an IFF identifier</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a newly allocated string containing the text identifier.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g3d-iff-open"></a><h3>g3d_iff_open ()</h3>
<pre class="programlisting"><span class="returnvalue">FILE</span> *              g3d_iff_open                        (<em class="parameter"><code>const <span class="type">gchar</span> *filename</code></em>,
                                                         <em class="parameter"><code><span class="type">guint32</span> *id</code></em>,
                                                         <em class="parameter"><code><span class="type">guint32</span> *len</code></em>);</pre>
<p>
Opens an IFF file, checks it and reads its top level container.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
<td>file name of IFF file</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
<td>top level ID (out)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>length of top level container (out)</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the file pointer of open file or NULL in case of an error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g3d-iff-readchunk"></a><h3>g3d_iff_readchunk ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 g3d_iff_readchunk                   (<em class="parameter"><code><span class="type">FILE</span> *f</code></em>,
                                                         <em class="parameter"><code><span class="type">guint32</span> *id</code></em>,
                                                         <em class="parameter"><code><span class="type">guint32</span> *len</code></em>,
                                                         <em class="parameter"><code><span class="type">guint32</span> flags</code></em>);</pre>
<p>
Reads one chunk header from an IFF file.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>f</code></em> :</span></p></td>
<td>the open IFF file pointer</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
<td>ID of chunk (out)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
<td>length of chunk (excluding header) (out)</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td>flags</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>real length of chunk including header and possible padding byte</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="G3DIffChunkCallback"></a><h3>G3DIffChunkCallback ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>            (*G3DIffChunkCallback)              (<em class="parameter"><code><a class="link" href="libg3d-iff.html#G3DIffGlobal" title="G3DIffGlobal"><span class="type">G3DIffGlobal</span></a> *global</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libg3d-iff.html#G3DIffLocal" title="G3DIffLocal"><span class="type">G3DIffLocal</span></a> *local</code></em>);</pre>
<p>
IFF callback function prototype.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>global</code></em> :</span></p></td>
<td>the global data</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>local</code></em> :</span></p></td>
<td>the local data</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>TRUE on success, FALSE else.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g3d-iff-chunk-callback"></a><h3>g3d_iff_chunk_callback</h3>
<pre class="programlisting">#define g3d_iff_chunk_callback G3DIffChunkCallback
</pre>
<p>
IFF chunk callback (deprecated).
</p>
</div>
<hr>
<div class="refsect2">
<a name="G3DIffChunkInfo"></a><h3>G3DIffChunkInfo</h3>
<pre class="programlisting">typedef struct {
	gchar *id;
	gchar *description;
	gboolean container;
	G3DIffChunkCallback callback;
} G3DIffChunkInfo;
</pre>
<p>
A chunk type description.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><span class="type">gchar</span> *<em class="structfield"><code><a name="G3DIffChunkInfo.id"></a>id</code></em>;</span></p></td>
<td>identifier of chunk</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">gchar</span> *<em class="structfield"><code><a name="G3DIffChunkInfo.description"></a>description</code></em>;</span></p></td>
<td>human-readable description of chunk type</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">gboolean</span> <em class="structfield"><code><a name="G3DIffChunkInfo.container"></a>container</code></em>;</span></p></td>
<td>TRUE if this chunk contains sub-chunks</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="libg3d-iff.html#G3DIffChunkCallback" title="G3DIffChunkCallback ()"><span class="type">G3DIffChunkCallback</span></a> <em class="structfield"><code><a name="G3DIffChunkInfo.callback"></a>callback</code></em>;</span></p></td>
<td>function to be called if such a chunk is found</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g3d-iff-chunk-info"></a><h3>g3d_iff_chunk_info</h3>
<pre class="programlisting">#define g3d_iff_chunk_info G3DIffChunkInfo
</pre>
<p>
IFF chunk description (deprecated).
</p>
</div>
<hr>
<div class="refsect2">
<a name="G3DIffGlobal"></a><h3>G3DIffGlobal</h3>
<pre class="programlisting">typedef struct {
	G3DContext *context;
	G3DModel *model;
	G3DStream *stream;
	guint32 flags;
	gpointer user_data;
	FILE *f;
	long int max_fpos;
} G3DIffGlobal;
</pre>
<p>
The plugin-global data to be given to IFF callback functions.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a class="link" href="libg3d-context.html#G3DContext" title="G3DContext"><span class="type">G3DContext</span></a> *<em class="structfield"><code><a name="G3DIffGlobal.context"></a>context</code></em>;</span></p></td>
<td>a valid context</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="libg3d-model.html#G3DModel" title="G3DModel"><span class="type">G3DModel</span></a> *<em class="structfield"><code><a name="G3DIffGlobal.model"></a>model</code></em>;</span></p></td>
<td>a model</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="libg3d-stream.html#G3DStream" title="G3DStream"><span class="type">G3DStream</span></a> *<em class="structfield"><code><a name="G3DIffGlobal.stream"></a>stream</code></em>;</span></p></td>
<td>the stream to read model from</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="G3DIffGlobal.flags"></a>flags</code></em>;</span></p></td>
<td>IFF flags</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">gpointer</span> <em class="structfield"><code><a name="G3DIffGlobal.user-data"></a>user_data</code></em>;</span></p></td>
<td>to be used by plugin</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">FILE</span> *<em class="structfield"><code><a name="G3DIffGlobal.f"></a>f</code></em>;</span></p></td>
<td>file to read model from (DEPRECATED)</td>
</tr>
<tr>
<td><p><span class="term">long <span class="type">int</span> <em class="structfield"><code><a name="G3DIffGlobal.max-fpos"></a>max_fpos</code></em>;</span></p></td>
<td>maximum file position (DEPRECATED)</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g3d-iff-gdata"></a><h3>g3d_iff_gdata</h3>
<pre class="programlisting">#define g3d_iff_gdata G3DIffGlobal
</pre>
<p>
IFF global data (deprecated).
</p>
</div>
<hr>
<div class="refsect2">
<a name="G3DIffLocal"></a><h3>G3DIffLocal</h3>
<pre class="programlisting">typedef struct {
	guint32 id;
	guint32 parent_id;
	gpointer object;
	gint32 level;
	gpointer level_object;
	gint32 nb;
	gboolean finalize;
} G3DIffLocal;
</pre>
<p>
The function-local data for IFF callback functions.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="G3DIffLocal.id"></a>id</code></em>;</span></p></td>
<td>chunk identifier</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">guint32</span> <em class="structfield"><code><a name="G3DIffLocal.parent-id"></a>parent_id</code></em>;</span></p></td>
<td>parent chunk identifier</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">gpointer</span> <em class="structfield"><code><a name="G3DIffLocal.object"></a>object</code></em>;</span></p></td>
<td>an object set by parent callbacks, may be NULL</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">gint32</span> <em class="structfield"><code><a name="G3DIffLocal.level"></a>level</code></em>;</span></p></td>
<td>level of chunk</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">gpointer</span> <em class="structfield"><code><a name="G3DIffLocal.level-object"></a>level_object</code></em>;</span></p></td>
<td>object shared by callbacks on the same level, may be NULL</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">gint32</span> <em class="structfield"><code><a name="G3DIffLocal.nb"></a>nb</code></em>;</span></p></td>
<td>number of bytes remaining in chunk, has to be decremented after
correctly after reading from stream</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">gboolean</span> <em class="structfield"><code><a name="G3DIffLocal.finalize"></a>finalize</code></em>;</span></p></td>
<td>for container chunks the callback function is called before
and after processing possible sub-chunks, the second time <em class="parameter"><code>finalize</code></em> is set
to TRUE</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g3d-iff-ldata"></a><h3>g3d_iff_ldata</h3>
<pre class="programlisting">#define g3d_iff_ldata G3DIffLocal
</pre>
<p>
IFF local data (deprecated).
</p>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>