unroff-website/www/doc/m-13.html

87 lines
3.2 KiB
HTML

<html>
<head>
<!-- This file has been generated by unroff 1.0, 03/21/96 19:29:47. -->
<!-- Do not edit! -->
<link rev="made" href="mailto:net@informatik.uni-bremen.de">
<title>unroff Programmer's Manual, section 13.</title>
</head><body>
<h2><a name="section13">13.</a>&#160;<tt> </tt>Miscellaneous Primitives
</h2>
<p>
&#160;<tt> </tt>&#160;<tt> </tt>&#160;<tt> </tt>The first two primitives described in this section are not essential,
as the same function could be achieved with pipe streams,
although with greater overhead.<tt> </tt>
The remaining primitives perform a number of troff-specific operations
and are only useful in a few specialized contexts.<tt> </tt>
<h2>
(shell-command <i>command</i>)
</h2>
<p>
&#160;<tt> </tt>&#160;<tt> </tt>&#160;<tt> </tt>Runs the specified
<i>command
</i>(which must be a string) as a shell command by passing it to a call to
<i>system</i>(3).<tt> </tt>
The return value is that of
<i>system()
</i>(an integer).<tt> </tt>
<h2>
(remove-file <i>filename</i>)
</h2>
<p>
&#160;<tt> </tt>&#160;<tt> </tt>&#160;<tt> </tt>Removes the specified file;
<i>filename
</i>must be a string or a symbol.<tt> </tt>
<h2>
(troff-compatible?)
</h2>
<p>
&#160;<tt> </tt>&#160;<tt> </tt>&#160;<tt> </tt>This predicate returns #t if troff compatibility mode has been
enabled (i.e. if the option
<b>-C
</b>has been given), otherwise #f.<tt> </tt>
<h2>
(set-escape! <i>char</i>)
</h2>
<p>
&#160;<tt> </tt>&#160;<tt> </tt>&#160;<tt> </tt>Sets the troff escape character (initially `\') to the specified
character argument.<tt> </tt>
This primitive is used to implement the ``.ec'' request.<tt> </tt>
<h2>
<a name=".filter-eqn-line">(filter-eqn-line <i>string</i>)</a></h2>
<p>
&#160;<tt> </tt>&#160;<tt> </tt>&#160;<tt> </tt>This primitive scans the string argument (which is supposed to
be passed to the
<i>eqn
</i>preprocessor afterwards) for occurrences of the ``delim'' directive.<tt> </tt>
If a ``delim'' directive is found, the current inline equation
delimiters maintained by the parser are changed or disabled as specified by
the directive.<tt> </tt>
The primitive returns #f if
<i>string
</i>is empty or consists just of white space, or if it contains
a valid ``delim'' or ``define'' directive, otherwise #t.<tt> </tt>
The inline equation delimiters are disabled initially.<tt> </tt>
<p>
&#160;<tt> </tt>&#160;<tt> </tt>&#160;<tt> </tt>The primitive is supposed to be used by implementations of
the request ``.EQ'' and inline equation event handlers to intercept the
<i>eqn
</i>input.<tt> </tt>
In this case, the
<i>eqn
</i>preprocessor need only be invoked if
<i>filter-eqn-line
</i>returned #t at least once.<tt> </tt>
<h2>
(skip-group)
</h2>
<p>
&#160;<tt> </tt>&#160;<tt> </tt>&#160;<tt> </tt>This primitive reads input lines from the current input stream
and scans them for the escape sequences `\{' and `\}' until
the nesting level of conditional input is balanced (i.e. until
a matching closing brace for an initial opening brace has been found).<tt> </tt>
The primitive is only useful for the implementation of the
troff requests for conditional input.<tt> </tt>
<p><hr>
Markup created by <em>unroff</em> 1.0,&#160;<tt> </tt>&#160;<tt> </tt>March 21, 1996,&#160;<tt> </tt>&#160;<tt> </tt>net@informatik.uni-bremen.de</body>
</html>