]> 4ch.mooo.com Git - 16.git/blob - 16/adplug/libbinio/doc/libbinio.info-2
wwww~
[16.git] / 16 / adplug / libbinio / doc / libbinio.info-2
1 This is ../../doc/libbinio.info, produced by makeinfo version 4.3 from
2 ../../doc/libbinio.texi.
3
4 This manual documents the binary I/O stream class library, version
5 1.4. It was last updated on 18 August 2004.
6
7    Copyright (C) 2002 - 2004 Simon Peter
8
9      Permission is granted to copy, distribute and/or modify this
10      document under the terms of the GNU Free Documentation License,
11      Version 1.1 or any later version published by the Free Software
12      Foundation; with no Invariant Sections, with the Front-Cover texts
13      being "A GNU Manual," and with the Back-Cover Texts as in (a)
14      below.  A copy of the license is included in the section entitled
15      "GNU Free Documentation License."
16
17      (a) The FSF's Back-Cover Text is: "You have freedom to copy and
18      modify this GNU Manual, like GNU software.  Copies published by
19      the Free Software Foundation raise funds for GNU development."
20    
21 INFO-DIR-SECTION Software Libraries
22 START-INFO-DIR-ENTRY
23 * libbinio: (libbinio)          Binary I/O stream class library 1.4
24 END-INFO-DIR-ENTRY
25
26 \1f
27 File: libbinio.info,  Node: GNU Free Documentation License,  Up: Copying This Manual
28
29 GNU Free Documentation License
30 ==============================
31
32                         Version 1.1, March 2000
33      Copyright (C) 2000 Free Software Foundation, Inc.
34      59 Temple Place, Suite 330, Boston, MA  02111-1307, USA
35      
36      Everyone is permitted to copy and distribute verbatim copies
37      of this license document, but changing it is not allowed.
38
39   0. PREAMBLE
40
41      The purpose of this License is to make a manual, textbook, or other
42      written document "free" in the sense of freedom: to assure everyone
43      the effective freedom to copy and redistribute it, with or without
44      modifying it, either commercially or noncommercially.  Secondarily,
45      this License preserves for the author and publisher a way to get
46      credit for their work, while not being considered responsible for
47      modifications made by others.
48
49      This License is a kind of "copyleft", which means that derivative
50      works of the document must themselves be free in the same sense.
51      It complements the GNU General Public License, which is a copyleft
52      license designed for free software.
53
54      We have designed this License in order to use it for manuals for
55      free software, because free software needs free documentation: a
56      free program should come with manuals providing the same freedoms
57      that the software does.  But this License is not limited to
58      software manuals; it can be used for any textual work, regardless
59      of subject matter or whether it is published as a printed book.
60      We recommend this License principally for works whose purpose is
61      instruction or reference.
62
63   1. APPLICABILITY AND DEFINITIONS
64
65      This License applies to any manual or other work that contains a
66      notice placed by the copyright holder saying it can be distributed
67      under the terms of this License.  The "Document", below, refers to
68      any such manual or work.  Any member of the public is a licensee,
69      and is addressed as "you".
70
71      A "Modified Version" of the Document means any work containing the
72      Document or a portion of it, either copied verbatim, or with
73      modifications and/or translated into another language.
74
75      A "Secondary Section" is a named appendix or a front-matter
76      section of the Document that deals exclusively with the
77      relationship of the publishers or authors of the Document to the
78      Document's overall subject (or to related matters) and contains
79      nothing that could fall directly within that overall subject.
80      (For example, if the Document is in part a textbook of
81      mathematics, a Secondary Section may not explain any mathematics.)
82      The relationship could be a matter of historical connection with
83      the subject or with related matters, or of legal, commercial,
84      philosophical, ethical or political position regarding them.
85
86      The "Invariant Sections" are certain Secondary Sections whose
87      titles are designated, as being those of Invariant Sections, in
88      the notice that says that the Document is released under this
89      License.
90
91      The "Cover Texts" are certain short passages of text that are
92      listed, as Front-Cover Texts or Back-Cover Texts, in the notice
93      that says that the Document is released under this License.
94
95      A "Transparent" copy of the Document means a machine-readable copy,
96      represented in a format whose specification is available to the
97      general public, whose contents can be viewed and edited directly
98      and straightforwardly with generic text editors or (for images
99      composed of pixels) generic paint programs or (for drawings) some
100      widely available drawing editor, and that is suitable for input to
101      text formatters or for automatic translation to a variety of
102      formats suitable for input to text formatters.  A copy made in an
103      otherwise Transparent file format whose markup has been designed
104      to thwart or discourage subsequent modification by readers is not
105      Transparent.  A copy that is not "Transparent" is called "Opaque".
106
107      Examples of suitable formats for Transparent copies include plain
108      ASCII without markup, Texinfo input format, LaTeX input format,
109      SGML or XML using a publicly available DTD, and
110      standard-conforming simple HTML designed for human modification.
111      Opaque formats include PostScript, PDF, proprietary formats that
112      can be read and edited only by proprietary word processors, SGML
113      or XML for which the DTD and/or processing tools are not generally
114      available, and the machine-generated HTML produced by some word
115      processors for output purposes only.
116
117      The "Title Page" means, for a printed book, the title page itself,
118      plus such following pages as are needed to hold, legibly, the
119      material this License requires to appear in the title page.  For
120      works in formats which do not have any title page as such, "Title
121      Page" means the text near the most prominent appearance of the
122      work's title, preceding the beginning of the body of the text.
123
124   2. VERBATIM COPYING
125
126      You may copy and distribute the Document in any medium, either
127      commercially or noncommercially, provided that this License, the
128      copyright notices, and the license notice saying this License
129      applies to the Document are reproduced in all copies, and that you
130      add no other conditions whatsoever to those of this License.  You
131      may not use technical measures to obstruct or control the reading
132      or further copying of the copies you make or distribute.  However,
133      you may accept compensation in exchange for copies.  If you
134      distribute a large enough number of copies you must also follow
135      the conditions in section 3.
136
137      You may also lend copies, under the same conditions stated above,
138      and you may publicly display copies.
139
140   3. COPYING IN QUANTITY
141
142      If you publish printed copies of the Document numbering more than
143      100, and the Document's license notice requires Cover Texts, you
144      must enclose the copies in covers that carry, clearly and legibly,
145      all these Cover Texts: Front-Cover Texts on the front cover, and
146      Back-Cover Texts on the back cover.  Both covers must also clearly
147      and legibly identify you as the publisher of these copies.  The
148      front cover must present the full title with all words of the
149      title equally prominent and visible.  You may add other material
150      on the covers in addition.  Copying with changes limited to the
151      covers, as long as they preserve the title of the Document and
152      satisfy these conditions, can be treated as verbatim copying in
153      other respects.
154
155      If the required texts for either cover are too voluminous to fit
156      legibly, you should put the first ones listed (as many as fit
157      reasonably) on the actual cover, and continue the rest onto
158      adjacent pages.
159
160      If you publish or distribute Opaque copies of the Document
161      numbering more than 100, you must either include a
162      machine-readable Transparent copy along with each Opaque copy, or
163      state in or with each Opaque copy a publicly-accessible
164      computer-network location containing a complete Transparent copy
165      of the Document, free of added material, which the general
166      network-using public has access to download anonymously at no
167      charge using public-standard network protocols.  If you use the
168      latter option, you must take reasonably prudent steps, when you
169      begin distribution of Opaque copies in quantity, to ensure that
170      this Transparent copy will remain thus accessible at the stated
171      location until at least one year after the last time you
172      distribute an Opaque copy (directly or through your agents or
173      retailers) of that edition to the public.
174
175      It is requested, but not required, that you contact the authors of
176      the Document well before redistributing any large number of
177      copies, to give them a chance to provide you with an updated
178      version of the Document.
179
180   4. MODIFICATIONS
181
182      You may copy and distribute a Modified Version of the Document
183      under the conditions of sections 2 and 3 above, provided that you
184      release the Modified Version under precisely this License, with
185      the Modified Version filling the role of the Document, thus
186      licensing distribution and modification of the Modified Version to
187      whoever possesses a copy of it.  In addition, you must do these
188      things in the Modified Version:
189
190        A. Use in the Title Page (and on the covers, if any) a title
191           distinct from that of the Document, and from those of
192           previous versions (which should, if there were any, be listed
193           in the History section of the Document).  You may use the
194           same title as a previous version if the original publisher of
195           that version gives permission.
196
197        B. List on the Title Page, as authors, one or more persons or
198           entities responsible for authorship of the modifications in
199           the Modified Version, together with at least five of the
200           principal authors of the Document (all of its principal
201           authors, if it has less than five).
202
203        C. State on the Title page the name of the publisher of the
204           Modified Version, as the publisher.
205
206        D. Preserve all the copyright notices of the Document.
207
208        E. Add an appropriate copyright notice for your modifications
209           adjacent to the other copyright notices.
210
211        F. Include, immediately after the copyright notices, a license
212           notice giving the public permission to use the Modified
213           Version under the terms of this License, in the form shown in
214           the Addendum below.
215
216        G. Preserve in that license notice the full lists of Invariant
217           Sections and required Cover Texts given in the Document's
218           license notice.
219
220        H. Include an unaltered copy of this License.
221
222        I. Preserve the section entitled "History", and its title, and
223           add to it an item stating at least the title, year, new
224           authors, and publisher of the Modified Version as given on
225           the Title Page.  If there is no section entitled "History" in
226           the Document, create one stating the title, year, authors,
227           and publisher of the Document as given on its Title Page,
228           then add an item describing the Modified Version as stated in
229           the previous sentence.
230
231        J. Preserve the network location, if any, given in the Document
232           for public access to a Transparent copy of the Document, and
233           likewise the network locations given in the Document for
234           previous versions it was based on.  These may be placed in
235           the "History" section.  You may omit a network location for a
236           work that was published at least four years before the
237           Document itself, or if the original publisher of the version
238           it refers to gives permission.
239
240        K. In any section entitled "Acknowledgments" or "Dedications",
241           preserve the section's title, and preserve in the section all
242           the substance and tone of each of the contributor
243           acknowledgments and/or dedications given therein.
244
245        L. Preserve all the Invariant Sections of the Document,
246           unaltered in their text and in their titles.  Section numbers
247           or the equivalent are not considered part of the section
248           titles.
249
250        M. Delete any section entitled "Endorsements".  Such a section
251           may not be included in the Modified Version.
252
253        N. Do not retitle any existing section as "Endorsements" or to
254           conflict in title with any Invariant Section.
255
256      If the Modified Version includes new front-matter sections or
257      appendices that qualify as Secondary Sections and contain no
258      material copied from the Document, you may at your option
259      designate some or all of these sections as invariant.  To do this,
260      add their titles to the list of Invariant Sections in the Modified
261      Version's license notice.  These titles must be distinct from any
262      other section titles.
263
264      You may add a section entitled "Endorsements", provided it contains
265      nothing but endorsements of your Modified Version by various
266      parties--for example, statements of peer review or that the text
267      has been approved by an organization as the authoritative
268      definition of a standard.
269
270      You may add a passage of up to five words as a Front-Cover Text,
271      and a passage of up to 25 words as a Back-Cover Text, to the end
272      of the list of Cover Texts in the Modified Version.  Only one
273      passage of Front-Cover Text and one of Back-Cover Text may be
274      added by (or through arrangements made by) any one entity.  If the
275      Document already includes a cover text for the same cover,
276      previously added by you or by arrangement made by the same entity
277      you are acting on behalf of, you may not add another; but you may
278      replace the old one, on explicit permission from the previous
279      publisher that added the old one.
280
281      The author(s) and publisher(s) of the Document do not by this
282      License give permission to use their names for publicity for or to
283      assert or imply endorsement of any Modified Version.
284
285   5. COMBINING DOCUMENTS
286
287      You may combine the Document with other documents released under
288      this License, under the terms defined in section 4 above for
289      modified versions, provided that you include in the combination
290      all of the Invariant Sections of all of the original documents,
291      unmodified, and list them all as Invariant Sections of your
292      combined work in its license notice.
293
294      The combined work need only contain one copy of this License, and
295      multiple identical Invariant Sections may be replaced with a single
296      copy.  If there are multiple Invariant Sections with the same name
297      but different contents, make the title of each such section unique
298      by adding at the end of it, in parentheses, the name of the
299      original author or publisher of that section if known, or else a
300      unique number.  Make the same adjustment to the section titles in
301      the list of Invariant Sections in the license notice of the
302      combined work.
303
304      In the combination, you must combine any sections entitled
305      "History" in the various original documents, forming one section
306      entitled "History"; likewise combine any sections entitled
307      "Acknowledgments", and any sections entitled "Dedications".  You
308      must delete all sections entitled "Endorsements."
309
310   6. COLLECTIONS OF DOCUMENTS
311
312      You may make a collection consisting of the Document and other
313      documents released under this License, and replace the individual
314      copies of this License in the various documents with a single copy
315      that is included in the collection, provided that you follow the
316      rules of this License for verbatim copying of each of the
317      documents in all other respects.
318
319      You may extract a single document from such a collection, and
320      distribute it individually under this License, provided you insert
321      a copy of this License into the extracted document, and follow
322      this License in all other respects regarding verbatim copying of
323      that document.
324
325   7. AGGREGATION WITH INDEPENDENT WORKS
326
327      A compilation of the Document or its derivatives with other
328      separate and independent documents or works, in or on a volume of
329      a storage or distribution medium, does not as a whole count as a
330      Modified Version of the Document, provided no compilation
331      copyright is claimed for the compilation.  Such a compilation is
332      called an "aggregate", and this License does not apply to the
333      other self-contained works thus compiled with the Document, on
334      account of their being thus compiled, if they are not themselves
335      derivative works of the Document.
336
337      If the Cover Text requirement of section 3 is applicable to these
338      copies of the Document, then if the Document is less than one
339      quarter of the entire aggregate, the Document's Cover Texts may be
340      placed on covers that surround only the Document within the
341      aggregate.  Otherwise they must appear on covers around the whole
342      aggregate.
343
344   8. TRANSLATION
345
346      Translation is considered a kind of modification, so you may
347      distribute translations of the Document under the terms of section
348      4.  Replacing Invariant Sections with translations requires special
349      permission from their copyright holders, but you may include
350      translations of some or all Invariant Sections in addition to the
351      original versions of these Invariant Sections.  You may include a
352      translation of this License provided that you also include the
353      original English version of this License.  In case of a
354      disagreement between the translation and the original English
355      version of this License, the original English version will prevail.
356
357   9. TERMINATION
358
359      You may not copy, modify, sublicense, or distribute the Document
360      except as expressly provided for under this License.  Any other
361      attempt to copy, modify, sublicense or distribute the Document is
362      void, and will automatically terminate your rights under this
363      License.  However, parties who have received copies, or rights,
364      from you under this License will not have their licenses
365      terminated so long as such parties remain in full compliance.
366
367  10. FUTURE REVISIONS OF THIS LICENSE
368
369      The Free Software Foundation may publish new, revised versions of
370      the GNU Free Documentation License from time to time.  Such new
371      versions will be similar in spirit to the present version, but may
372      differ in detail to address new problems or concerns.  See
373      `http://www.gnu.org/copyleft/'.
374
375      Each version of the License is given a distinguishing version
376      number.  If the Document specifies that a particular numbered
377      version of this License "or any later version" applies to it, you
378      have the option of following the terms and conditions either of
379      that specified version or of any later version that has been
380      published (not as a draft) by the Free Software Foundation.  If
381      the Document does not specify a version number of this License,
382      you may choose any version ever published (not as a draft) by the
383      Free Software Foundation.
384
385 ADDENDUM: How to use this License for your documents
386 ----------------------------------------------------
387
388    To use this License in a document you have written, include a copy of
389 the License in the document and put the following copyright and license
390 notices just after the title page:
391
392        Copyright (C)  YEAR  YOUR NAME.
393        Permission is granted to copy, distribute and/or modify this document
394        under the terms of the GNU Free Documentation License, Version 1.1
395        or any later version published by the Free Software Foundation;
396        with the Invariant Sections being LIST THEIR TITLES, with the
397        Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
398        A copy of the license is included in the section entitled ``GNU
399        Free Documentation License''.
400
401    If you have no Invariant Sections, write "with no Invariant Sections"
402 instead of saying which ones are invariant.  If you have no Front-Cover
403 Texts, write "no Front-Cover Texts" instead of "Front-Cover Texts being
404 LIST"; likewise for Back-Cover Texts.
405
406    If your document contains nontrivial examples of program code, we
407 recommend releasing these examples in parallel under your choice of
408 free software license, such as the GNU General Public License, to
409 permit their use in free software.
410
411 \1f
412 File: libbinio.info,  Node: Concept Index,  Next: Class Index,  Prev: Copying This Manual,  Up: Top
413
414 Concept Index
415 *************
416
417 * Menu:
418
419 * Administrative classes:                Concepts.
420 * Alien architectures:                   Alien architectures.
421 * Appending to files:                    Files.
422 * Base classes:                          Base classes.
423 * Basics:                                Basics.
424 * Closing files:                         Files.
425 * Compile-time configuration:            Configuration.
426 * Concepts:                              Concepts.
427 * Configuration:                         Configuration.
428 * Conversion layer:                      Concepts.
429 * Converting from other architectures:   Alien architectures.
430 * Copying this manual:                   Copying This Manual.
431 * Data conversion:                       Alien architectures.
432 * End of file error checking:            Errors.
433 * Errors:                                Errors.
434 * Examples:                              Examples.
435 * FAQ:                                   FAQ.
436 * FDL, GNU Free Documentation License:   GNU Free Documentation License.
437 * Features:                              Features.
438 * File open mode:                        Files.
439 * File stream classes:                   File stream classes.
440 * File streams:                          File streams.
441 * Files:                                 Files.
442 * Flags:                                 Alien architectures.
443 * input-only:                            Basics.
444 * input/output:                          Basics.
445 * Introduction:                          Introduction.
446 * iostream wrappers <1>:                 iostream wrappers.
447 * iostream wrappers:                     Wrapping around iostream.
448 * Opening files:                         Files.
449 * Other Architectures:                   Alien architectures.
450 * output-only:                           Basics.
451 * Positioning:                           Seeking.
452 * Reading:                               Reading and Writing.
453 * Reading flags:                         Alien architectures.
454 * Reference:                             Reference.
455 * Seeking:                               Seeking.
456 * Setting flags:                         Alien architectures.
457 * Simple error checking:                 Errors.
458 * Stream layer:                          Concepts.
459 * String streams:                        String streams.
460 * Usage:                                 Usage.
461 * Wrapping around iostream:              Wrapping around iostream.
462 * Writing:                               Reading and Writing.
463
464 \1f
465 File: libbinio.info,  Node: Class Index,  Next: Method Index,  Prev: Concept Index,  Up: Top
466
467 Class Index
468 ***********
469
470 * Menu:
471
472 * binfbase <1>:                          File stream classes.
473 * binfbase:                              binfbase.
474 * binfstream:                            File stream classes.
475 * binifstream:                           File stream classes.
476 * binio:                                 binio.
477 * binisstream:                           String streams.
478 * binistream:                            binistream.
479 * biniwstream:                           iostream wrappers.
480 * binofstream:                           File stream classes.
481 * binosstream:                           String streams.
482 * binostream:                            binostream.
483 * binowstream:                           iostream wrappers.
484 * binsbase:                              String streams.
485 * binsstream:                            String streams.
486 * binstream:                             binstream.
487 * binwstream:                            iostream wrappers.
488
489 \1f
490 File: libbinio.info,  Node: Method Index,  Next: Type Variable and Macro Index,  Prev: Class Index,  Up: Top
491
492 Method Index
493 ************
494
495 * Menu:
496
497 * binfbase():                            binfbase.
498 * binfstream():                          File stream classes.
499 * binfstream(const char *filename, const Mode mode = 0): File stream classes.
500 * binfstream(const std::string &filename, const Mode mode = 0): File stream classes.
501 * binifstream():                         File stream classes.
502 * binifstream(const char *filename, const Mode mode = NoCreate): File stream classes.
503 * binifstream(const std::string &filename, const Mode mode = NoCreate): File stream classes.
504 * binio():                               binio.
505 * binisstream(void *str, unsigned long len): String streams.
506 * binistream():                          binistream.
507 * biniwstream(istream *istr):            iostream wrappers.
508 * binofstream():                         File stream classes.
509 * binofstream(const char *filename, const Mode mode = 0): File stream classes.
510 * binofstream(const std::string &filename, const Mode mode = 0): File stream classes.
511 * binosstream(void *str, unsigned long len): String streams.
512 * binostream():                          binostream.
513 * binowstream(ostream *ostr):            iostream wrappers.
514 * binsbase(void *str, unsigned long len): String streams.
515 * binsstream(void *str, unsigned long len): String streams.
516 * binwstream(iostream *str):             iostream wrappers.
517 * bool ateof():                          binistream.
518 * bool eof():                            binio.
519 * bool getFlag(Flag f):                  binio.
520 * Error error():                         binio.
521 * Float peekFloat(FType ft):             binistream.
522 * Float pow(Float base, signed int exp): binio.
523 * Float readFloat(FType ft):             binistream.
524 * Int peekInt(unsigned int size):        binistream.
525 * Int readInt(unsigned int size):        binistream.
526 * long pos():                            binfbase.
527 * std::string readString(const char delim = '\0'): binistream.
528 * unsigned long readString(char *str, unsigned long maxlen, const char delim): binistream.
529 * unsigned long writeString(const char *str, unsigned long amount = 0);: binostream.
530 * unsigned long writeString(const std::string &str);: binostream.
531 * virtual Byte getByte():                binistream.
532 * virtual long pos() <1>:                iostream wrappers.
533 * virtual long pos() <2>:                String streams.
534 * virtual long pos():                    binio.
535 * virtual void open(const char *filename, const Mode mode): binfbase.
536 * virtual void open(const std::string &filename, const Mode mode): binfbase.
537 * virtual void putByte(Byte):            binostream.
538 * virtual void seek(long pos, Offset offs = Set) <1>: iostream wrappers.
539 * virtual void seek(long pos, Offset offs = Set): String streams.
540 * virtual void seek(long, Offset = Set): binio.
541 * void close():                          binfbase.
542 * void ignore(unsigned long amount = 1): binistream.
543 * void seek(long pos, Offset offs = Set): binfbase.
544 * void setFlag(Flag f, bool set = true): binio.
545 * void writeFloat(Float f, FType ft);:   binostream.
546 * void writeInt(Int val, unsigned int size);: binostream.
547 * ~binfbase():                           binfbase.
548 * ~binfstream():                         File stream classes.
549 * ~binifstream():                        File stream classes.
550 * ~binio():                              binio.
551 * ~binisstream():                        String streams.
552 * ~binistream():                         binistream.
553 * ~biniwstream():                        iostream wrappers.
554 * ~binofstream():                        File stream classes.
555 * ~binosstream():                        String streams.
556 * ~binostream():                         binostream.
557 * ~binowstream():                        iostream wrappers.
558 * ~binsbase():                           String streams.
559 * ~binsstream():                         String streams.
560 * ~binwstream():                         iostream wrappers.
561
562 \1f
563 File: libbinio.info,  Node: Type Variable and Macro Index,  Prev: Method Index,  Up: Top
564
565 Type, Variable and Macro Index
566 ******************************
567
568 * Menu:
569
570 * Add:                                   binio.
571 * Append:                                binfbase.
572 * BigEndian:                             binio.
573 * BINIO_ENABLE_IOSTREAM:                 Configuration.
574 * BINIO_ENABLE_STRING:                   Configuration.
575 * BINIO_ISO_STDLIB:                      Configuration.
576 * BINIO_WITH_MATH:                       Configuration.
577 * Byte:                                  binio.
578 * Byte *data:                            String streams.
579 * Byte *spos:                            String streams.
580 * Denied:                                binio.
581 * Double:                                binio.
582 * End:                                   binio.
583 * enum ErrorCode:                        binio.
584 * enum Flag:                             binio.
585 * enum FType:                            binio.
586 * enum ModeFlags:                        binfbase.
587 * enum Offset:                           binio.
588 * Eof:                                   binio.
589 * Error err:                             binio.
590 * Fatal:                                 binio.
591 * FILE *f:                               binfbase.
592 * Flags:                                 binio.
593 * Flags my_flags:                        binio.
594 * Float:                                 binio.
595 * FloatIEEE:                             binio.
596 * Int:                                   binio.
597 * int Error:                             binio.
598 * long length:                           String streams.
599 * Mode:                                  binfbase.
600 * NoCreate:                              binfbase.
601 * NoError:                               binio.
602 * NotFound:                              binio.
603 * NotOpen:                               binio.
604 * Set:                                   binio.
605 * Single:                                binio.
606 * static const Flags system_flags:       binio.
607 * Unsupported:                           binio.
608
609