$(OFILES): $(HFILES)
sst.6: sst.xml
- xmlto man sst.xml
+ xmlto --skip-validation man sst.xml
sst-doc.txt: sst-doc.xml
xmlto -m sst-layer.xsl --skip-validation txt sst-doc.xml
#define INCLUDED // Define externs here\r
-#include "sst.h"\r
#include <ctype.h>\r
+#include <getopt.h>\r
+#include "sst.h"\r
\r
#ifndef SSTDOC\r
#define SSTDOC "sst.doc"\r
\r
\r
int main(int argc, char **argv) {\r
- int i;\r
+ int i, option, usecurses = TRUE;\r
int hitme;\r
char ch;\r
\r
- iostart();\r
+ while ((option = getopt(argc, argv, "t")) != -1) {\r
+ switch (option) {\r
+ case 't':\r
+ usecurses = FALSE;\r
+ break;\r
+ default:\r
+ fprintf(stderr, "usage: sst [-t] [startcommand...].\n");\r
+ exit(0);\r
+ }\r
+ }\r
+\r
+ iostart(usecurses);\r
prelim(); \r
line[0] = '\0';\r
- if (argc > 1) {\r
- while (--argc > 0) {\r
- strcat(line, *(++argv));\r
- strcat(line, " ");\r
- }\r
+ for (i = optind; i < argc; i++) {\r
+ strcat(line, argv[i]);\r
+ strcat(line, " ");\r
}\r
-\r
while (TRUE) { /* Play a game */\r
setup(line[0] == '\0');\r
if (alldone) {\r
void movetho(void);\r
void probe(void);\r
void clearscreen(void);\r
-void iostart(void);\r
+void iostart(int);\r
void ioend(void);\r
void getline(char *, int);\r
<refsynopsisdiv id='synopsis'>
<cmdsynopsis>
- <command>sst</command>
+ <command>sst
+ <arg choice='opt'>-t </arg>
+ <arg rep='repeat' ><replaceable>command</replaceable></arg>
+ </command>
</cmdsynopsis>
</refsynopsisdiv>
systems where <filename>/usr/share/doc/sst/</filename> is a legal
filename, it will probably be installed there as well.</para>
-<para>Input tokens for the setup prompts will be read from the command
-line before standard input. Thus, for example, you can invoke the
-program as</para>
+<para>There is one option -t, which forces the original pure-tty mode.
+Normally sst tries to come up in full-screen mode that assumes it is
+running on a cursor-addressable terminal or terminal emulator.</para>
+
+<para>Input tokens for the setup prompts will be read from the
+remainder of the command line before standard input. Thus, for
+example, you can invoke the program as</para>
<programlisting>
sst regular medium good foobar