#include "spice.h"
#include "cpdefs.h"
#include <errno.h>
#include <sys/types.h>
#include "ftegraph.h"
Go to the source code of this file.
Value: cw->wl_next->wl_prev = cw; \
i = 0;
static char buf[MAXPROMPT]
int bzero(char *ptr, int num)
Definition at line 70 of file lexical.c.
Definition at line 79 of file lexical.c.
101 cw->wl_next = cw->wl_prev =
NULL;
113 if ((c != EOF) && (c !=
ESCAPE) && (c != 4))
115 if (c != EOF && c != 4)
118 fprintf(
cp_err,
"Warning: word too long.\n");
122 fprintf(
cp_err,
"Warning: line too long.\n");
132 if (c ==
'\\' && DIR_TERM !=
'\\' || c ==
'\026' ) {
134 linebuf[j++] =
strip(c);
160 cw->wl_word =
copy(buf);
162 else if (cw->wl_prev) {
163 cw->wl_prev->wl_next =
NULL;
172 while (((c = (
string ? *
string++ :
175 if ((c ==
'\n') || (c == EOF) || (c ==
ESCAPE))
191 if ((c ==
'\n') || (c == EOF) || (c ==
ESCAPE))
193 else if (c ==
'\\') {
195 c = (
string ? *
string++ :
220 "Use \"quit\" to quit.\n",
224 fputs(
"quit\n", stdout);
232 (void) fputc(
'\r',
cp_out);
234 for (j = 0; linebuf[j]; j++)
237 (
void) ioctl(fileno(
cp_in), TIOCSTI,
240 fputc(linebuf[j],
cp_out);
247 fputs(
"quit\n", stdout);
257 fputs(
"\b\b \b\b\r",
cp_out);
259 for (j = 0; linebuf[j]; j++)
262 (
void) ioctl(fileno(
cp_in), TIOCSTI,
265 fputc(linebuf[j],
cp_out);
286 if (i > 1 && (buf[i-1] ==
'#' || buf[i-1] ==
'?') &&
305 if (i > 1 && buf[i-2] ==
'$')
320 if (c ==
'=' || (d ==
'<' && c ==
'>')) {
330 if (i > 1 && buf[i-2] ==
'$')
332 if (i > 2 && (buf[i-2] ==
'#' || buf[i-2] ==
'?') &&
static char buf[MAXPROMPT]
int bzero(char *ptr, int num)
Definition at line 350 of file lexical.c.
char * getcwd(char *buf, int size)
char* cp_altprompt = NULL |
char* cp_promptstring = NULL |