123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- <html lang="en">
- <head>
- <title>Library Reference - avram - a virtual machine code interpreter</title>
- <meta http-equiv="Content-Type" content="text/html">
- <meta name="description" content="avram - a virtual machine code interpreter">
- <meta name="generator" content="makeinfo 4.13">
- <link title="Top" rel="start" href="index.html#Top">
- <link rel="prev" href="Virtual-Machine-Specification.html#Virtual-Machine-Specification" title="Virtual Machine Specification">
- <link rel="next" href="Character-Table.html#Character-Table" title="Character Table">
- <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
- <meta http-equiv="Content-Style-Type" content="text/css">
- <style type="text/css"><!--
- pre.display { font-family:inherit }
- pre.format { font-family:inherit }
- pre.smalldisplay { font-family:inherit; font-size:smaller }
- pre.smallformat { font-family:inherit; font-size:smaller }
- pre.smallexample { font-size:smaller }
- pre.smalllisp { font-size:smaller }
- span.sc { font-variant:small-caps }
- span.roman { font-family:serif; font-weight:normal; }
- span.sansserif { font-family:sans-serif; font-weight:normal; }
- --></style>
- </head>
- <body>
- <div class="node">
- <a name="Library-Reference"></a>
- <p>
- Next: <a rel="next" accesskey="n" href="Character-Table.html#Character-Table">Character Table</a>,
- Previous: <a rel="previous" accesskey="p" href="Virtual-Machine-Specification.html#Virtual-Machine-Specification">Virtual Machine Specification</a>,
- Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
- <hr>
- </div>
- <h2 class="chapter">3 Library Reference</h2>
- <p>Much of the code developed for <code>avram</code> may be reusable in other
- projects, so it has been packaged into a library and documented in this
- chapter. For ease of reference, this chapter is organized with a
- separate section for each source file. For the most part, each source
- file encapsulates an abstract type and a number of related functions,
- except for a few cases where C makes such a design awkward. An attempt
- has been made to present the sections in a readable order as far as
- possible.
- <p>The documentation in this chapter is confined to the application program
- interface (API), and does not delve unnecessarily into any details of the
- <a name="index-API-392"></a>implementation. A reader wishing to extend, modify, or troubleshoot the
- library itself can find additional information in the source code
- comments. These are more likely to be in sync with the code than this
- document may be, and are more readily accessible to someone working with
- the code.
- <p>Some general points pertaining to the library are the following.
- <ul>
- <li>Unlike the previous chapter, this chapter uses the word
- “function” in the C sense rather than the mathematical sense of the word.
- <li>Internal errors are internal from the user's point of view, not
- the developer's (<a href="Internal-Errors.html#Internal-Errors">Internal Errors</a>). Invoking these functions in
- ways that are contrary to their specifications can certainly cause
- internal errors (not to mention segfaults).
- <li>The library is definitely not thread safe, and thread safety is
- <a name="index-threads-393"></a>not a planned enhancement. The amount of locking required to make it
- thread safe would probably incur an objectionable performance penalty
- due to the complexity of the shared data structures involved, in
- addition to being very difficult to get right. If you need these
- facilities in a concurrent application, consider spawning a process for
- <a name="index-spawning-processes-394"></a>each client of the library so as to keep their address spaces separate.
- <li>The library files are built from the standard source
- distribution using GNU <samp><span class="command">libtool</span></samp>. In the default directory
- hierarchy, they will be found
- either in <samp><span class="file">/usr/lib/libavram.*</span></samp> or in <samp><span class="file">/usr/local/lib/libavram.*</span></samp>.
- These directories will differ in a non-standard installation.
- <li>The header files will probably be
- located in either <samp><span class="file">/usr/include/avm/*.h</span></samp> or
- <samp><span class="file">/usr/local/include/avm/*.h</span></samp> for a standard installation.
- <li>All exported functions, macros and constants are
- preceded with <code>avm_</code>, so as to reduce the chance of name clashes
- with other libraries. Not all type declarations or field identifiers
- follow this convention, because that would be far too tedious.
- <li>The library header files are designed to be compatible with C++
- <a name="index-C_002b_002b-395"></a>but have been tested only with C. Please refer to platform specific
- documentation for further information on how to link library modules
- with your own code.
- </ul>
- <ul class="menu">
- <li><a accesskey="1" href="Lists.html#Lists">Lists</a>
- <li><a accesskey="2" href="Characters-and-Strings.html#Characters-and-Strings">Characters and Strings</a>
- <li><a accesskey="3" href="File-Manipulation.html#File-Manipulation">File Manipulation</a>
- <li><a accesskey="4" href="Invocation.html#Invocation">Invocation</a>
- <li><a accesskey="5" href="Version-Management.html#Version-Management">Version Management</a>
- <li><a accesskey="6" href="Error-Reporting.html#Error-Reporting">Error Reporting</a>
- <li><a accesskey="7" href="Profiling.html#Profiling">Profiling</a>
- <li><a accesskey="8" href="Emulation-Primitives.html#Emulation-Primitives">Emulation Primitives</a>
- <li><a accesskey="9" href="External-Library-Maintenance.html#External-Library-Maintenance">External Library Maintenance</a>
- </ul>
- </body></html>
|