\r
static void clearscreen(void);\r
\r
-#define NUMCOMMANDS 34\r
-\r
/* Compared to original version, I've changed the "help" command to\r
"call" and the "terminate" command to "quit" to better match\r
user expectations. The DECUS version apparently made those changes\r
*/\r
\r
\r
-static char *commands[NUMCOMMANDS] = {\r
+static char *commands[] = {\r
"srscan",\r
"lrscan",\r
"phasers",\r
"quit",\r
"help"\r
};\r
+#define NUMCOMMANDS sizeof(commands)/sizeof(commands[0])\r
\r
static void listCommands(int x) {\r
prout(" SRSCAN MOVE PHASERS CALL\n"\r
}\r
\r
\r
-void main(int argc, char **argv) {\r
+int main(int argc, char **argv) {\r
int i;\r
int hitme;\r
char ch;\r
chew();\r
return IHEOL;\r
}\r
- gets(line);\r
+ fgets(line, sizeof(line), stdin);\r
+ line[strlen(line)-1] = '\0';\r
linep = line;\r
}\r
// Skip leading white space\r