#include <sys/types.h>#include <stdio.h>#include "shell.h"#include <fcntl.h>#include <errno.h>#include "syntax.h"#include "input.h"#include "output.h"#include "memalloc.h"#include "error.h"Include dependency graph for input.c:

Go to the source code of this file.
Data Structures | |
| struct | parsefile |
Defines | |
| #define | EOF_NLEFT -99 |
Functions | |
| char *readline | __P ((const char *prompt)) |
| STATIC void | pushfile () |
| char * | pfgets (char *line, len) |
| int | pgetc () |
| int | preadbuffer () |
| void | pungetc () |
| void | ppushback (char *string, length) |
| void | setinputfile (char *fname, push) |
| void | setinputfd (fd, push) |
| void | setinputstring (char *string, push) |
| void | popfile () |
| void | popallfiles () |
| void | closescript () |
Variables | |
| static char | sccsid [] = "@(#)input.c 5.4 (Berkeley) 7/1/91" |
| int | plinno = 1 |
| MKINIT int | parsenleft |
| char * | parsenextc |
| MKINIT struct parsefile | basepf |
| char | basebuf [BUFSIZ] |
| parsefile * | parsefile = &basepf |
| char * | pushedstring |
| int | pushednleft |
| char * | r_use_prompt = NULL |
|
|
Definition at line 56 of file input.c. Referenced by preadbuffer(). |
|
|
|
|
|
Definition at line 408 of file input.c. References close, parsefile::fd, parsefile, and popallfiles(). Referenced by forkshell(). |
|
||||||||||||
|
Definition at line 124 of file input.c. References c, parsefile::nleft, NULL, p, and pgetc_macro. |
|
|
Definition at line 154 of file input.c. References pgetc_macro. Referenced by parseheredoc(), readtoken1(), tryexec(), and xxreadtoken(). |
|
|
Definition at line 395 of file input.c. References basepf, parsefile, and popfile(). Referenced by closescript(). |
|
|
Definition at line 373 of file input.c. Referenced by dotcmd(), evalstring(), expudir(), listfiles(), popallfiles(), read_profile(), and readcmdfile(). |
|
||||||||||||
|
Definition at line 273 of file input.c. References length, parsenextc, parsenleft, pushednleft, and pushedstring. |
|
|
Definition at line 171 of file input.c. References parsefile::buf, BUFSIZ, EINTR, EOF_NLEFT, errno, errout, EWOULDBLOCK, F_GETFL, F_SETFL, fcntl, parsefile::fd, flags, flushout(), free, i, NULL, O_NONBLOCK, out2str(), p, parsefile, parsenextc, parsenleft, prompt, pushednleft, pushedstring, read, readline(), strcpy(), and strlen(). |
|
|
Definition at line 261 of file input.c. References parsenextc, and parsenleft. Referenced by readtoken1(), tryexec(), and xxreadtoken(). |
|
|
Definition at line 359 of file input.c. References ckmalloc(), parsefile::fd, parsefile::linno, parsefile::nextc, parsefile::nleft, parsefile, parsenextc, parsenleft, plinno, and parsefile::prev. Referenced by adddir(), listfiles(), main(), setinputfd(), and setinputstring(). |
|
||||||||||||
|
Definition at line 317 of file input.c. References parsefile::buf, BUFSIZ, ckmalloc(), close, F_GETFD, F_SETFD, fcntl, parsefile::fd, FD_CLOEXEC, NULL, parsefile, parsenleft, plinno, and pushfile(). Referenced by read_profile(), readcmdfile(), and setinputfile(). |
|
||||||||||||
|
Definition at line 290 of file input.c. References close, copyfd(), error, fd2, INTOFF, INTON, O_RDONLY, open, and setinputfd(). Referenced by dotcmd(), expudir(), procargs(), and tryexec(). |
|
||||||||||||
|
Definition at line 338 of file input.c. References parsefile::buf, INTOFF, INTON, NULL, parsefile, parsenextc, parsenleft, plinno, pushfile(), and strlen(). Referenced by evalstring(). |
|
|
|
|
|
Definition at line 78 of file input.c. Referenced by popallfiles(). |
|
|
Definition at line 80 of file input.c. Referenced by closescript(), popallfiles(), popfile(), preadbuffer(), pushfile(), setinputfd(), and setinputstring(). |
|
|
Definition at line 77 of file input.c. Referenced by popfile(), ppushback(), preadbuffer(), pungetc(), pushfile(), setinputstring(), and tryexec(). |
|
|
Definition at line 76 of file input.c. Referenced by popfile(), ppushback(), preadbuffer(), pungetc(), pushfile(), setinputfd(), setinputstring(), and tryexec(). |
|
|
Definition at line 75 of file input.c. Referenced by popfile(), pushfile(), readtoken1(), setinputfd(), setinputstring(), and xxreadtoken(). |
|
|
Definition at line 82 of file input.c. Referenced by ppushback(), and preadbuffer(). |
|
|
Definition at line 81 of file input.c. Referenced by ppushback(), and preadbuffer(). |
|
|
Definition at line 86 of file input.c. Referenced by putprompt(). |
|
|
|
1.4.6