/*
* 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 (c) 2000 by Sun Microsystems, Inc.
* All rights reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <setjmp.h>
char *
{
}
void
{
char *name;
int len;
env->instance_mode = 0;
}
void
{
char *name;
int len;
}
void
{
char *name;
int len;
}
void
{
char *name;
int len;
}
void
{
char *name;
int len;
}
void
{
char *name;
int len;
}
void
{
exit(0);
}
void
{
}
/*
* In interactive mode, jmp_buf_ptr should be non-null.
*/
void
{
if (jmp_buf_ptr)
}
void
{
int level;
env->interactive++;
jmp_buf_ptr = &jmp_env;
if (in_forth_abort > 1) {
MYSELF = 0;
IP = 0;
env->order_depth = 0;
} else {
}
in_forth_abort = 0;
} else {
}
int wlen;
char *p;
#define USE_READLINE
#ifdef USE_READLINE
{
char *line;
void read_line(fcode_env_t *);
continue;
}
#else
printf("ok ");
break;
continue;
#endif
*p = '\0';
continue;
}
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
}
static void
{
} else {
}
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
int fd;
int len, n;
char *name;
char *buffer;
if (fd < 0) {
}
if (buffer == 0)
}
void
{
if (TOS > 0)
}
void
{
char *buffer;
}
}
void
{
char *buffer;
}
int num_lines = 0;
static void
{
int i;
if (num_lines < MAX_LINE_BUF)
else {
FREE(history_lines[0]);
for (i = 0; i < MAX_LINE_BUF - 1; i++)
}
}
static void
{
int i;
for (i = 0; i < n; i++)
}
static void
{
int i;
for (i = 0; i < n; i++)
}
static char *
{
cursor++;
cursor++;
return (cursor);
}
static char *
{
int skippedword = 0;
return (cursor);
cursor--;
cursor--;
skippedword++;
cursor--;
}
cursor++;
return (cursor);
}
void
{
int len;
/* backup to beginning of previous line */
/* overwrite new line */
/* Output blanks to erase previous line chars if old line was longer */
/* Backup cursor for new line */
}
static void
{
save_buf[n] = '\0';
}
void
{
fstack_t d;
return;
}
savetermio = termio;
save_buf[0] = '\0';
if (do_quote) {
do_quote = 0;
*cursor++ = d;
}
continue;
}
if (saw_esc) {
saw_esc = 0;
switch (d) {
default: /* Ignore anything else */
continue;
case 'b': /* Move backward one word */
case 'B':
}
continue;
case 'f': /* Move forward one word */
case 'F':
}
continue;
case 'h': /* Erase from beginning of word to */
case 'H': /* just before cursor, saving chars */
d = CTRL('w');
break;
case 'd':
case 'D':
continue;
continue;
}
}
switch (d) {
default:
*cursor++ = d;
}
continue;
saw_esc = 1;
continue;
continue;
continue;
continue;
if (d == CTRL('p')) {
if (cur_line <= 0)
continue;
}
cur_line--;
} else {
continue;
cur_line++;
continue;
}
}
p = history_lines[cur_line];
continue;
continue;
/* chars, at eol, joins two lines */
continue;
p = save_line;
num_lines -= 1;
} else {
cur_line++;
p = history_lines[cur_line];
}
continue;
}
cursor);
continue;
continue;
continue;
continue;
if (len == 0)
continue;
continue;
do_quote = 1;
continue;
for (i = 0; i < num_lines; i++) {
strlen(history_lines[i]));
}
continue;
continue;
continue;
continue;
cursor--;
continue;
case 0x7f: /* DEL */
continue;
eol - 1);
cursor--;
eol--;
continue;
case '\r':
case '\n':
*eol = '\0';
break;
}
break;
}
}
static void
{
char *prompt;
}
static void
_init(void)
{
}