/usr/share/doc/yaz-doc/yaz-asncomp.html is in yaz-doc 4.2.18-1build1.
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 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>yaz-asncomp</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="YAZ User's Guide and Reference"><link rel="up" href="reference.html" title="Reference"><link rel="prev" href="zoomsh.html" title="zoomsh"><link rel="next" href="yaz-marcdump.html" title="yaz-marcdump"></head><body><link rel="stylesheet" type="text/css" href="common/style1.css"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">yaz-asncomp</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="zoomsh.html">Prev</a> </td><th width="60%" align="center">Reference</th><td width="20%" align="right"> <a accesskey="n" href="yaz-marcdump.html">Next</a></td></tr></table><hr></div><div class="refentry" title="yaz-asncomp"><a name="yaz-asncomp"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>yaz-asncomp — YAZ ASN.1 compiler</p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">yaz-asncomp</code> [<code class="option">-v</code>] [<code class="option">-c <em class="replaceable"><code>cfile</code></em></code>] [<code class="option">-h <em class="replaceable"><code>hfile</code></em></code>] [<code class="option">-p <em class="replaceable"><code>pfile</code></em></code>] [<code class="option">-d <em class="replaceable"><code>config</code></em></code>] [<code class="option">-I <em class="replaceable"><code>includeout</code></em></code>] [<code class="option">-i <em class="replaceable"><code>includedir</code></em></code>] [<code class="option">-m <em class="replaceable"><code>module</code></em></code>] [filename]</p></div></div><div class="refsect1" title="DESCRIPTION"><a name="idp6905232"></a><h2>DESCRIPTION</h2><p>
<span class="command"><strong>yaz-asncomp</strong></span> is an ASN.1 compiler that
reads an ASN.1 specification in <em class="replaceable"><code>filename</code></em>
and produces C/C++ definitions and BER encoders/decoders for it.
</p><p>
The produced C/C++ code and header files uses the ODR module of YAZ
which is a library that encodes/decodes/prints BER packages.
<span class="command"><strong>yaz-asncomp</strong></span> allows you to specify name of
resulting source via options. Alternatively, you can specify
a DEFINISIONS file, which provides customized output to
many output files - if the ASN.1 specification file consists
of many modules.
</p><p>
This utility is written in Tcl. Any version of Tcl should work.
</p></div><div class="refsect1" title="OPTIONS"><a name="idp6907664"></a><h2>OPTIONS</h2><div class="variablelist"><dl><dt><span class="term"><code class="literal">-v </code>
</span></dt><dd><p>
Makes the ASN.1 compiler print more verbose about the
various stages of operations.
</p></dd><dt><span class="term"><code class="literal">-c </code>
<em class="replaceable"><code>cfile</code></em></span></dt><dd><p>
Specifies the name of the C/C++ file with encoders/decoders.
</p></dd><dt><span class="term"><code class="literal">-h </code>
<em class="replaceable"><code>hfile</code></em></span></dt><dd><p>
Specifies the name of header file with definitions.
</p></dd><dt><span class="term"><code class="literal">-p </code>
<em class="replaceable"><code>pfile</code></em></span></dt><dd><p>
Specifies the name of the a private header file with
definitions. By default all definitions are put
in header file (option -h).
</p></dd><dt><span class="term"><code class="literal">-d </code>
<em class="replaceable"><code>dfile</code></em></span></dt><dd><p>
Specifies the name of a definitions file.
</p></dd><dt><span class="term"><code class="literal">-I </code>
<em class="replaceable"><code>iout</code></em></span></dt><dd><p>
Specifies first part of directory in which header files
are written.
</p></dd><dt><span class="term"><code class="literal">-i </code>
<em class="replaceable"><code>idir</code></em></span></dt><dd><p>
Specifies second part of directory in which header files
are written.
</p></dd><dt><span class="term"><code class="literal">-m </code>
<em class="replaceable"><code>module</code></em></span></dt><dd><p>
Specifies that ASN.1 compiler should only process the
module given. If this option is not specified,
all modules in the ASN.1 file are processed.
</p></dd></dl></div></div><div class="refsect1" title="DEFINITIONS FILE"><a name="idp6916968"></a><h2>DEFINITIONS FILE</h2><p>
The definitions file is really a Tcl script but follows
traditional rules for Shell like configuration files.
That is # denotes the beginning of a comment. Definitions
are line oriented. The definitions files usually consists of
a series of variable assignments of the form:
</p><p>
<code class="literal">set</code> <em class="replaceable"><code>name</code></em> <em class="replaceable"><code>value</code></em>
</p><p>
Available variables are:
</p><div class="variablelist"><dl><dt><span class="term"><code class="literal">default-prefix</code></span></dt><dd><p>
Sets prefix for names in the produced output.
The value consists of three tokens: C function prefix,
C typedef prefix and preprocessor prefix respectively.
</p></dd><dt><span class="term"><code class="literal">prefix(</code><em class="replaceable"><code>module</code></em><code class="literal">)</code></span></dt><dd><p>
This value sets prefix values for module
<em class="replaceable"><code>module</code></em>.
The value has same form as <code class="literal">default-prefix</code>.
</p></dd><dt><span class="term"><code class="literal">filename(</code><em class="replaceable"><code>module</code></em><code class="literal">)</code></span></dt><dd><p>
Specifies filename for C/header file for module
<em class="replaceable"><code>module</code></em>.
</p></dd><dt><span class="term"><code class="literal">init(</code><em class="replaceable"><code>module</code></em><code class="literal">,h)</code></span></dt><dd><p>
Code fragment to be put in first part of public header for module
<em class="replaceable"><code>module</code></em>.
</p></dd><dt><span class="term"><code class="literal">body(</code><em class="replaceable"><code>module</code></em><code class="literal">,h)</code></span></dt><dd><p>
Code fragment to be put in last part of public header for module
<em class="replaceable"><code>module</code></em> (trailer).
</p></dd><dt><span class="term"><code class="literal">init(</code><em class="replaceable"><code>module</code></em><code class="literal">,c)</code></span></dt><dd><p>
Code fragment to be put in first part of C based encoder/decoder for
module <em class="replaceable"><code>module</code></em>.
</p></dd><dt><span class="term"><code class="literal">body(</code><em class="replaceable"><code>module</code></em><code class="literal">,c)</code></span></dt><dd><p>
Code fragment to be put in last part of C based encoder/decoder for
module <em class="replaceable"><code>module</code></em> (trailer).
</p></dd><dt><span class="term"><code class="literal">map(</code><em class="replaceable"><code>module</code></em><code class="literal">,</code><em class="replaceable"><code>name</code></em><code class="literal">)</code></span></dt><dd><p>
Maps ASN.1 type in module <em class="replaceable"><code>module</code></em>
of <em class="replaceable"><code>name</code></em> to value.
</p></dd><dt><span class="term"><code class="literal">membermap(</code><em class="replaceable"><code>module</code></em><code class="literal">,</code><em class="replaceable"><code>name</code></em><code class="literal">,</code><em class="replaceable"><code>member</code></em><code class="literal">)</code></span></dt><dd><p>
Maps member <em class="replaceable"><code>member</code></em> in SEQUENCE/CHOICE of
<em class="replaceable"><code>name</code></em> in module
<em class="replaceable"><code>module</code></em> to value.
The value consists of one or two tokens.
First token is name of C preprocessor part. Second token
is resulting C member name. If second token is omitted
the value (one token) is both preprocessor part and
C <code class="literal">struct</code>,<code class="literal">union</code>.
</p></dd><dt><span class="term"><code class="literal">unionmap(</code><em class="replaceable"><code>module</code></em><code class="literal">,</code><em class="replaceable"><code>name</code></em><code class="literal">,</code><em class="replaceable"><code>member</code></em><code class="literal">)</code></span></dt><dd><p>
Maps member <em class="replaceable"><code>member</code></em> in CHOICE of
<em class="replaceable"><code>name</code></em> in module
<em class="replaceable"><code>module</code></em> to value.
Value consists of to or three tokens. The first token
is name of the integer in the <code class="literal">union</code> that
is used as selector for the <code class="literal">union</code> itself.
The second token is name of the <code class="literal">union</code>.
The third token overrides the name of the CHOICE member;
if omitted the member name is used.
</p></dd></dl></div><p>
</p></div><div class="refsect1" title="FILES"><a name="idp6939520"></a><h2>FILES</h2><p>
<code class="filename">/usr/share/yaz/z39.50/z.tcl</code>
</p><p>
<code class="filename">/usr/share/yaz/z39.50/*.asn</code>
</p></div><div class="refsect1" title="SEE ALSO"><a name="idp6940960"></a><h2>SEE ALSO</h2><p>
<span class="citerefentry"><span class="refentrytitle">yaz</span>(7)</span>
</p><p>
Section "The ODR Module" in the YAZ manual.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="zoomsh.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="yaz-marcdump.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">zoomsh </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> yaz-marcdump</td></tr></table></div></body></html>
|