/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2000-2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Embedded Fcode Interpreter
*
* Process cmd line args and invoke Fcode engine.
*/
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <strings.h>
#include <stropts.h>
#include <ctype.h>
#include <fcdriver/fcdriver.h>
void *fc_env;
void
{
" -D fcode_debug = true\n");
" -d <level> set debug level\n");
" -i go 'interactive'\n");
" -s <string> interpret <string> as forth\n");
" -a FCODE image has a.out header\n");
" -e [<msglvl>:]<errorlog> Set error log file\n");
" -l <msglvl> Set syslog message level\n");
" -k Toggle OBP page kludge\n");
}
int
{
extern char *optarg;
int c, aout = 0;
int debug = 0;
int lflag = 0;
int error_log_flags;
extern void run_one_efdaemon_request(fcode_env_t *);
switch (c) {
case 'a':
aout = 1;
break;
case 'd':
if (debug)
break;
case 'e':
*errlog++ = '\0';
} else {
}
break;
case 'l':
lflag++;
break;
case 'D':
break;
case 'f':
fcode_file = optarg;
break;
case 'i':
forthstr = "interact";
break;
case 's':
break;
case '?':
exit(1);
}
}
if (forthstr) {
} else if (fcode_file) {
} else {
if ((debug & DEBUG_FC_LIST) != 0 &&
" debug\n");
if (errlog)
else
}
if ((debug & ~DEBUG_FC_LIST) != 0 &&
if (errlog)
else
}
if (syslog_flags & MSG_FC_DEBUG)
" not recommended for syslog\n");
}
}
return (0);
}