Copyright (C) 1981 by Mark of the Unicorn, Inc.
Created 81.3.12 Gyro
This code interprets the command line and the Scribble output file, and
calls the low-level abstraction to do the printing. This might turn
into a generalized driver.
Modifications Schedule:
08/03/81 -page option hack by Jeffrey D. Stone.
*/
#include "crayon.h"
int stpage, curpage; /* jds */
main (argc, argv)
int argc;
char **argv;
{
int ntimes, itime;
puts ("Crayon v1.1, Copyright (C) 1981 by Mark of the Unicorn, Inc.\n");
ntimes = 1;
stflag = TRUE; /* jds */
curpage = 1; /* jds */
stpage = 0; /* jds */
char *cstpage;
pausep = FALSE;
remark = "";
portname = NULL;
quietp = FALSE;
while (--argc > 0) {
if (**++argv == '-') {
if (isdigit ((*argv)[1])) ntimes = atoi (&(*argv)[1]);
else if (match ((*argv) + 1, "Pause")
|| match ((*argv) + 1, "P")) {
pausep = TRUE;
if (!quietp) puts ("Pausing between pages.\n");
}
else if (match ((*argv) + 1, "Port")) {
portname = *++argv;
--argc;
if (!quietp)
printf ("Using '%s' port(s).\n", portname);
}
else if (match ((*argv) + 1, "Page")) {
cstpage = *++argv;
--argc;
stpage = atoi(cstpage);
if (!quietp)
printf("Starting at page %d - first page is # 1.\n",stpage);
stflag = FALSE;