Ticket #57772: redcsl.1

File redcsl.1, 7.7 KB (added by mbrethen, 6 years ago)
Line 
1.TH REDCSL 1 "2010 October 10" "redcsl"
2.
3.
4.SH NAME
5redcsl \- Run REDUCE under CSL
6.
7.
8.SH Synopsis
9.B redcsl
10[
11.I command-line switches
12] [
13.I file ...\&
14]
15.
16.
17.SH DESCRIPTION
18.I redcsl
19runs REDUCE based on the
20.BR CSL
21Lisp system.
22.
23.
24.SH REDCSL Options
25.TP
26.I file
27read input from file.
28
29After all other options have been processed, the files given on the rest of
30the command line are read in and processed. A filename of
31.B -
32can be used to designate standard input.
33.TP
34.B -b [OIP]
35tells the system to avoid any attempt to recolour prompts and input text.
36It will mainly be needed on X terminals that have been set up so that they
37use colours that make the defaults here unhelpful, like white-on-black.
38
39This option can be followed by colour specifications to make things yet
40more specific. It is supposed to be the idea that three colours can be
41specified after it for output, input and prompts, with the letters KRGYbMCW
42standing for blacK, Red, Green, Yellow, blue, Magenta, Cyan and White.
43
44This may not fully work yet!
45.TP
46.BI -d " symbol[=value]"
47defines Lisp symbol
48.I symbol
49at system start, with value
50.I value
51.
52.TP
53.B -g
54enables debugging mode.  It sets a lisp variable
55.SB !*backtrace
56and arranges that all backtraces are displayed notwithstanding use of
57.SB errorset.
58.TP
59.BI \-i " imagefile\fR,\fP " \-i-
60CSL and Reduce use image files to keep both initial heap images and
61.I fasl
62loadable modules. By default if the executable launched has some name,
63say xxx, then an image file xxx.img is used. But to support greater
64generality
65.B -i
66introduces a new image,
67.B -i-
68indicates the default one and a sequence of such directives list
69image files that are searched in the order given. These are read-only.
70The similar option
71.B -o
72equally introduces image files that are scanned for input, but that
73can also be used for output. Normally there would only be one
74.B -o
75directive.
76.TP
77.BI -j " dumpfile"
78dumps a record of all the files read during the Lisp run into
79.I dumpfile
80with a view that it can be included in a Makefile to document dependencies.
81.TP
82.BI -k " nnn[/ss]"
83sets the size of the heap to be used.  If
84.BI -k nnn
85is given then that much
86memory will be allocated and the heap will never expand.  Without this
87option a default amount is used, and (on many machines) it will grow
88if space seems tight.
89
90If this options is given as
91.B -k
92.I nnn/ss
93then ss is the number of CSL pages to be allocated to the Lisp stack.
94The default value (which is 1) should suffice for almost all users, and
95it should be noted that the C stack is separate from and independent of
96this one and it too could overflow.
97
98A suffix K, M or G on the number indicates units of kilobytes,
99megabytes or gigabytes, with megabytes being the default. so
100.B -k200M
101might represent typical usage.
102.TP
103.BI -l " logfile"
104sends a copy of the standard output to
105.I logfile\fR.\fP
106It is very much as if the Lisp function
107.SB (spool logfile)
108had been invoked at the start of the run.
109.TP
110.B -n
111ignore startup function.
112
113Normally when the system is started it will run a
114.I restart function
115as indicated in its heap image. There can be cases where a heap image has
116been created in a bad way such that the saved restart function always fails
117abruptly, and hence working out what was wrong becomes hard. In such cases
118it may be useful to give the
119.B -n
120options that forces CSL to ignore any startup function and merely begin
121in a minimal Lisp-style read-eval-print loop.
122.TP
123.B -o
124see
125.B -i
126.TP
127.B -q
128quiet run: sets
129.SB !*echo
130to
131.SB nil
132and switches off garbage collector messages.
133.TP
134.BI -r " nnn[,mmm]"
135seed random number generator.
136
137The random-number generator in CSL is normally initialised to a value
138based on the time of day and is hence not reproducible from run to run.
139In many cases that behavious is desirable, but for debugging it can be useful
140to force a seed. The directive
141.B -r
142.I nnn[,mmm]
143sets the seed to up to 64 bits taken from the values
144.I nnn
145and
146.I mmm.
147THe second value is optional, and specifying
148.B -r0
149explicitly asks for the non-reproducible behaviour (I hope). Note that
150the main Reduce-level random number source is coded at a higher level
151and does not get reset this way - this is the lower level CSL
152generator.
153.TP
154.B -s
155sets the Lisp variable
156.SB !*plap
157and hence the compiler generates an assembly listing.
158.TP
159.BI -t " name"
160reports the time-stamp on the named module, and then exits. This is
161for use in perl scripts and the like, and is needed because the stamps
162on modules within an image or library file are not otherwise instantly
163available.
164
165Note that especially on windowed systems it may be necessary to use
166this with
167.BI -- " filename"
168since the information generated here goes to the default output, which
169in some cases is just the screen.
170.TP
171.BI -u " symbol"
172forcibly undefine a Lisp symbol. There are probably very very few
173cases where it is useful since I do not have a large number of
174system-specific predefined names.
175.TP
176.B -v
177An option to make things mildly more verbose. It displays more of a
178banner at startup and switches garbage collection messages on.
179.TP
180.B -w
181force console mode.
182
183On a typical system if the system is launched it creates a new window and uses
184its own windowed intarface in that. If it is run such that at startup the
185standard input or output are associated with a file or pipe, or under X the
186variable
187.SB DISPLAY
188is not set it will try to start up in console
189mode. The flag
190.B -w
191indicates that the system should run in console
192more regadless, while
193.B -w+
194attempts a window even if that seems doomed to failure. When running
195the system to obey a script it will often make sense to use the
196.B -w
197option. Note that on Windows the system is provided as
198two separate (but almost identical) binaries. For example the file
199.SB csl.exe
200is linked in windows mode. A result is that if launched from the
201command line it detaches from its console, and if launched by
202double-clicking it does not create a console. It is in fact very ugly
203when double clicking on an application causes an unwanted console
204window to appear. In contrast
205.SB csl.com
206is a console mode version of just the same program, so when launched
207from a command line it can communicate with the console in the
208ordinary expected manner.
209.TP
210.B -z
211start without image.
212
213When bootstrapping it is necessary to start up the system for one initial time
214without the benefit of any image file at all. This option makes
215this happen, so when it is specified the system starts up with a minimal
216environment and only those capabilities that are present in the CSL
217kernel. It will normally make sense to start loading some basic Lisp
218definitions rather rapidly. The files
219.SB compat.lsp
220,
221.SB extras.lsp
222and
223.SB compiler.lsp
224have Lisp source for the main things I use, and once they are loaded
225the Lisp compiler can be used to compile itself.
226.TP
227.B --help
228It is probably obvious what this option does! But in particular it
229displays an explanation of the
230.B --dump-source
231option, and hence should count as a prominent and easy-to-find way of
232alerting people to their rights and obligations. Note that on Windows
233of the application was linked as a windows binary it carefully creates
234a console to display the help text in, and organizes a delay to give
235people a chance to read it.
236.TP
237.BI -- " filename"
238If the application is run in console mode then its standard output could
239be redirected to a file using shell facilities. But the
240.B --
241directive (followed by a file name) redirects output within the Lisp
242rather than outside it. If this is done a very limited capability for
243sending progress or status reports to stderr (or the title-bar when
244running in windowed mode) remains via the
245.SB report!-right
246function.
247
248The
249.B -w
250option may frequently make sense in such cases, but if that
251is not used and the system tries to run in a window it will create it
252starting off minimised.
253.