/*Copyright (C) 1993, 1996 by Thomas Glen Smith. All Rights Reserved.*/
/* apl APL2 V1.0.1 *****************************************************
* This is the APL mainline module. *
***********************************************************************/
#define INCLUDES APLCB+APLDEBUG+APLMAIN+STDIO
#include "includes.h"
main(argc, argv)
int argc;
char *argv[];
{
#if APL_DEBUG
void mem_check(void);
void mem_init(void);
void mem_term(void);
#endif
Aplclean; Aplcpywr; Aplwkst; Funcsusp;
int loop = 1;
char *arg,c;
#include "aplinit.h"
while (argc > 1) {
arg=argv[--argc];
while ('\0' != (c = *arg++)) switch(c) {
case '-': break;
#if APL_DOS
case 'f': aplfont = 1; /* Use special font logic. */
break;
#endif
case 'q': aplquiet = 1; /* Start quietly. */
break;
default:
printf("Invalid option = %c\n",c);
exit(1);
} /* End of while/switch. */
} /* end while. */
#if APL_COPYRITE
if (aplquiet == 0)
aplcpywr(); /* emit copyright notice */
#endif
while (loop) {
funcsusp(); /* main terminal interaction */
loop = aplwkst(); /* go do deferred command */
}
aplclean(); /* go clean up memory */
#if APL_DEBUG
mem_term(); /* terminate the memory debugging package */
#endif
}