1998-04-10 06:59:06 -04:00
|
|
|
<HTML><HEAD><TITLE>January_1998 - STk manual page</TITLE></HEAD>
|
|
|
|
<BR>
|
1996-09-27 06:29:02 -04:00
|
|
|
<BODY bgcolor = white>
|
|
|
|
<H2><IMG ALIGN=BOTTOM SRC="./Img/ManPageWhite.gif"> stk, snow</H2>
|
|
|
|
<I>A Scheme interpreter using the Tk toolkit</I><P><IMG ALIGN=TOP SRC="./Img/line-red.gif">
|
|
|
|
<H3><A NAME="M2">SYNOPSIS</A></H3>
|
|
|
|
<B>stk</B> [<I>options</I>] [<I>arg arg ...</I>]<BR>
|
|
|
|
<B>snow</B> [<I>options</I>] [<I>arg arg ...</I>]<BR>
|
|
|
|
<H3><A NAME="M3">OPTIONS</A></H3>
|
|
|
|
<B>stk</B> interpreter accepts several command-line options which may
|
|
|
|
be abbreviated, as long as the abbreviation
|
|
|
|
is unambiguous (e.g. <B>-h</B>, <B>-he</B>, <B>-hel</B> are three possibe
|
|
|
|
abbreviations for the <B>-help</B> option).
|
|
|
|
|
|
|
|
<P>
|
|
|
|
<DL>
|
1998-04-10 06:59:06 -04:00
|
|
|
<DT><A NAME="M4"><B>-colormap new</B></A><DD>
|
|
|
|
Specifies that the window should have a new private colormap instead of
|
|
|
|
using the default colormap for the screen.
|
|
|
|
<P>
|
|
|
|
<DT><A NAME="M5"><B>-display </B><I>display</I></A><DD>
|
1996-09-27 06:29:02 -04:00
|
|
|
Display (and screen) on which to display window.
|
|
|
|
<P>
|
1998-04-10 06:59:06 -04:00
|
|
|
<DT><A NAME="M6"><B>-file </B><I>fileName</I></A><DD>
|
1996-09-27 06:29:02 -04:00
|
|
|
Read commands from <I>fileName</I> rather than standard input. The
|
|
|
|
last element in <I>fileName</I> will be used as the title for the
|
|
|
|
application and name of its interpreter for <B><A HREF="./send.n.html">send</A></B>
|
|
|
|
commands (unless overridden by the <B>-name</B> option\fR).
|
|
|
|
<P>
|
1998-04-10 06:59:06 -04:00
|
|
|
<DT><A NAME="M7"><B>-geometry </B><I>geometry</I></A><DD>
|
1996-09-27 06:29:02 -04:00
|
|
|
Initial geometry to use for window.
|
|
|
|
<P>
|
1998-04-10 06:59:06 -04:00
|
|
|
<DT><A NAME="M8"><B>-name </B><I>name</I></A><DD>
|
1996-09-27 06:29:02 -04:00
|
|
|
Use <I>name</I> as the title to be displayed in the window, and
|
|
|
|
as the name of the interpreter for <B><A HREF="./send.n.html">send</A></B> commands.
|
|
|
|
<P>
|
|
|
|
<DT><A NAME="M9"><B>-sync</B></A><DD>
|
|
|
|
Execute all X server commands synchronously, so that errors
|
|
|
|
are reported immediately. This will result in much slower
|
|
|
|
execution, but it is useful for debugging.
|
|
|
|
<P>
|
|
|
|
<DT><A NAME="M10"><B>-visual </B><I>visual</I></A><DD>
|
|
|
|
Specifies the visual to use for the window.<I>Visual</I> may be one of the following:
|
|
|
|
<I>best</I>, <I>directcolor</I>, <I>grayscale</I>, <I>greyscale</I>,
|
|
|
|
<I>pseudocolor</I>, <I>staticcolor</I>, <I>staticgray</I>,
|
|
|
|
<I>staticgrey</I>, <I>truecolor</I>, or <I>default</I>
|
|
|
|
<P>
|
|
|
|
<DT><A NAME="M11"><B>-no-tk</B></A><DD>
|
|
|
|
Don't initialize the Tk toolkit
|
|
|
|
<P>
|
|
|
|
<DT><A NAME="M12"><B>-load </B><I>fileName</I></A><DD>
|
|
|
|
Evaluate expressions contained in <I>fileName</I> before reading
|
|
|
|
expressions from standard input.
|
|
|
|
<P>
|
|
|
|
<DT><A NAME="M13"><B>-image </B><I>fileName</I></A><DD>
|
|
|
|
Restore the state saved in <I>fileName</I> by the <I>dump</I> primitive
|
|
|
|
(Note: For now, <I>dump</I> works only on SunOS 4.1.x, Linux 1.x (a.out format)
|
|
|
|
and FreeBSD).
|
|
|
|
<P>
|
|
|
|
<DT><A NAME="M14"><B>-cells </B><I>number</I></A><DD>
|
|
|
|
Set the default size for the heap to <I>number</I> cells. The given number is
|
|
|
|
also the amount of cells used when extending the heap. Default value is 20000.
|
|
|
|
<P>
|
|
|
|
<DT><A NAME="M15"><B>-interactive</B></A><DD>
|
|
|
|
Tell the interpreter that it is used interactively (even if it doesn't
|
|
|
|
think so).
|
|
|
|
<P>
|
|
|
|
<DT><A NAME="M16"><B>-help</B></A><DD>
|
|
|
|
Print a summary of the command-line options and exit.
|
|
|
|
<P>
|
|
|
|
<DT><A NAME="M17"><B>--</B></A><DD>
|
|
|
|
Pass all remaining arguments through to the script's <B>argv</B>
|
|
|
|
variable without interpreting them.
|
|
|
|
This provides a mechanism for passing arguments such as <B>-name</B>
|
|
|
|
to a script instead of having <B>wish</B> interpret them.
|
|
|
|
<P>
|
|
|
|
</DL>
|
|
|
|
<H3><A NAME="M18">DESCRIPTION</A></H3>
|
|
|
|
<B>Stk</B> is a Scheme R4RS interpreter which provide a simple access to the
|
|
|
|
X11 Tk toolkit. If the <B>-no-tk</B> option is provided to the interpreter,
|
|
|
|
the Tk library is not initialized and no main window is created. If
|
|
|
|
<B>stk</B> is invoked with no <B>-f</B> option then it reads Scheme
|
|
|
|
expressions interactively from standard input. It will continue processing
|
|
|
|
commands until all windows have been deleted or until end-of-file is
|
|
|
|
reached on standard input.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
<B>Snow</B> is a <I>light</I> version of the <B>stk</B> interpreter which
|
|
|
|
does not provide support for the Tk toolkit. This interpreter does not
|
|
|
|
recognize the options <B>-display</B>, <B>-geometry</B>, <B>-sync</B>
|
1998-04-10 06:59:06 -04:00
|
|
|
<B>-colormap</B>, <B>-visual</B> and <B>-no-tk</B> which are meaningless
|
1996-09-27 06:29:02 -04:00
|
|
|
without Tk. This interpreter is called, rather than the standard one,
|
|
|
|
when the shell DISPLAY variable is not initialized.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
If the <B>-file</B> option is provided to Tk, then <B>stk</B> reads Scheme
|
|
|
|
forms from the file named in the <B>-file</B> option. These
|
|
|
|
forms will normally create an interactive interface consisting
|
|
|
|
of one or more widgets. When the end of the command file is
|
|
|
|
reached, <B>stk</B> will continue to respond to X events until
|
|
|
|
all windows have been deleted.
|
1998-04-10 06:59:06 -04:00
|
|
|
<P>
|
|
|
|
<B>Note:</B> The <B>-file</B> exits for compatibility reasons and can be
|
|
|
|
eventually ommited. In there is no <B>-file</B> option used, the first
|
|
|
|
argument in the command line is taken as the name of the script file
|
|
|
|
to execute. To launch an interactive script with an argument, you have
|
|
|
|
to use the <B>--</B> option.
|
1996-09-27 06:29:02 -04:00
|
|
|
<P>
|
|
|
|
The <B>-interactive</B> option forces the interpreter in interactive
|
|
|
|
mode. In this mode, standard output and standard error are unbuffered.
|
|
|
|
Use this option when you launch <B>stk</B> from <B>emacs</B>.
|
|
|
|
|
|
|
|
|
|
|
|
<H3><A NAME="M19">VARIABLES</A></H3>
|
|
|
|
Following Scheme variables are set when <B>Stk</B> starts:
|
|
|
|
<P>
|
|
|
|
<DL>
|
|
|
|
<DT><A NAME="M20"><B>*argc*</B></A><DD>
|
|
|
|
Contains a count of the number of <I>arg</I> arguments (0 if none),
|
|
|
|
not including the options described above.
|
|
|
|
<P>
|
|
|
|
<DT><A NAME="M21"><B>*argv*</B></A><DD>
|
|
|
|
Contains a Scheme list whose elements are the <I>arg</I> arguments (not
|
|
|
|
including the options described above), in order, or an empty list
|
|
|
|
if there are no <I>arg</I> arguments.
|
|
|
|
<P>
|
1998-04-10 06:59:06 -04:00
|
|
|
<DT><A NAME="M22"><B>*program-name*</B> Contains <I>fileName</I> if it was provided (in a</A><DD>
|
|
|
|
<B>-file</B> option or as first argument of the command line).
|
|
|
|
Otherwise, contains the name by which the interpreter was invoked.
|
1996-09-27 06:29:02 -04:00
|
|
|
|
|
|
|
|
|
|
|
<P>
|
|
|
|
</DL>
|
|
|
|
<H3><A NAME="M23">SCRIPT FILES</A></H3>
|
|
|
|
If you create a STk script in a file whose first line is
|
|
|
|
<PRE><B>#!/usr/local/bin/stk -f</B></PRE>
|
|
|
|
then you can invoke the script file directly from your shell if
|
|
|
|
you mark it as executable.
|
|
|
|
This assumes that <B>stk</B> has been installed in the default
|
|
|
|
location in /usr/local/bin; if it's installed somewhere else
|
|
|
|
then you'll have to modify the above line to match.
|
1998-04-10 06:59:06 -04:00
|
|
|
Note that <B>-f</B> which was necessary with pre-4.0 versions of <B>STk</B>
|
|
|
|
is no more necessary and can be omitted.
|
1996-09-27 06:29:02 -04:00
|
|
|
|
|
|
|
<H3><A NAME="M24">ENVIRONMENT VARIABLES</A></H3>
|
|
|
|
<B>stk</B> uses the following shell variables:
|
|
|
|
<P>
|
|
|
|
<DL>
|
|
|
|
<DT><A NAME="M25"><I>STK_LIBRARY</I></A><DD>
|
|
|
|
This variable indicates where the library files are located. This variable
|
|
|
|
allows to overload the default value of the Scheme variable <I>*stk-library*</I>
|
|
|
|
which is automatically calculated by the interpreter.(i.e. <I>stk</I> or <I>snow</I>).
|
|
|
|
<P>
|
|
|
|
<DT><A NAME="M26"><I>STK_LOAD_PATH</I></A><DD>
|
|
|
|
This variable serves to initialize the <I>*load-path*</I> Scheme variable. This
|
|
|
|
variable is a list of paths to try when in a load command.
|
|
|
|
<P>
|
|
|
|
<DT><A NAME="M27"><I>STK_HELP_PATH</I></A><DD>
|
|
|
|
This variable serves to initialize the <I>*help-path*</I> Scheme variable. It
|
|
|
|
must contain a list of documentation directories. This variable is used by the help
|
|
|
|
procedure.
|
|
|
|
|
|
|
|
|
|
|
|
<P>
|
|
|
|
</DL>
|
|
|
|
<H3><A NAME="M28">FILES</A></H3>
|
|
|
|
<DL>
|
|
|
|
<DT><A NAME="M29"><I>./init.stk</I></A><DD>
|
|
|
|
<DT><A NAME="M30"><I>$STK_LIBRARY/STk/init.stk</I></A><DD>
|
|
|
|
When <B>stk</B> starts running, it tries to load the file <I>init.stk</I>
|
|
|
|
in the current directory. If this file is not present, it tries to load
|
|
|
|
this file in the <B>STk_LIBRARY</B> directory (the value of <B>STk_LIBRARY</B>
|
|
|
|
is automatically computed to be in a sibling directory of the interpreter
|
|
|
|
executable.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
<DT><A NAME="M31"><I>~/.stkrc</I></A><DD>
|
|
|
|
Standard <I>init.stk</I> file tries to load the file <I>~/.stkrc</I>. This file
|
1998-04-10 06:59:06 -04:00
|
|
|
can be used to store functions definitions or variables settings that you want
|
|
|
|
to be executed at each interpreter invocation.
|
1996-09-27 06:29:02 -04:00
|
|
|
|
|
|
|
<P>
|
|
|
|
</DL>
|
|
|
|
<H3><A NAME="M32">SEE ALSO</A></H3>
|
|
|
|
<B>wish(1)</B>
|
1998-04-10 06:59:06 -04:00
|
|
|
<P><IMG ALIGN=TOP SRC="./Img/line-red.gif"><P>
|
1996-09-27 06:29:02 -04:00
|
|
|
<A HREF=./STk-hlp.html><IMG ALIGN=BOTTOM SRC="./Img/RefBookWhite.gif"> Back to the <B>STk</B> main page</A>
|
|
|
|
</BODY></HTML>
|