#include <sys/types.h>#include <signal.h>#include <errno.h>#include <setjmp.h>#include "sh.h"Include dependency graph for sh1.c:

Go to the source code of this file.
Data Structures | |
| struct | region |
Defines | |
| #define | Extern extern |
| #define | CMASK 0377 |
| #define | QUOTE 0200 |
| #define | QMASK (CMASK&~QUOTE) |
| #define | NOT '!' |
| #define | REGSIZE sizeof(struct region) |
| #define | GROWBY 256 |
| #define | FREE 32767 |
| #define | BUSY 0 |
| #define | ALIGN (sizeof(int)-1) |
Functions | |
| _PROTOTYPE (void(*qflag),(int)) | |
| _PROTOTYPE (int main,(int argc, char **argv)) | |
| _PROTOTYPE (int newfile,(char *s)) | |
| _PROTOTYPE (static char *findeq,(char *cp)) | |
| _PROTOTYPE (static char *cclass,(char *p, int sub)) | |
| _PROTOTYPE (void initarea,(void)) | |
| int | main (int argc, char **argv) |
| void | setdash () |
| int | newfile (char *s) |
| void | onecommand () |
| void | fail () |
| void | leave () |
| void | warn (char *s) |
| void | err (char *s) |
| int | newenv (int f) |
| void | quitenv () |
| int | anys (char *s1, char *s2) |
| int | any (int c, char *s) |
| char * | putn (int n) |
| char * | itoa (unsigned u, int n) |
| void | next (int f) |
| void | onintr (int s) |
| int | letter (register c) |
| int | digit (register c) |
| int | letnum (register c) |
| char * | space (int n) |
| char * | strsave (char *s, int a) |
| void | xfree (char *s) |
| void | sig (int i) |
| void | runtrap (int i) |
| var * | lookup (char *n) |
| void | setval (struct var *vp, char *val) |
| void | nameval (struct var *vp, char *val, char *name) |
| void | export (struct var *vp) |
| void | ronly (struct var *vp) |
| int | isassign (char *s) |
| int | assign (char *s, int cf) |
| int | checkname (char *cp) |
| void | putvlist (int f, int out) |
| int | eqname (char *n1, char *n2) |
| static char * | findeq (char *cp) |
| int | gmatch (char *s, char *p) |
| static char * | cclass (char *p, int sub) |
| void | initarea () |
| char * | getcell (unsigned nbytes) |
| void | freecell (char *cp) |
| void | freearea (int a) |
| void | setarea (char *cp, int a) |
| int | getarea (char *cp) |
| void | garbage () |
Variables | |
| int | intr |
| int | inparse |
| char | flags ['z'-'a'+1] |
| char * | flag = flags-'a' |
| char * | elinep = line+sizeof(line)-5 |
| char * | null = "" |
| int | heedint = 1 |
| env | e |
| char ** | environ |
| char | shellname [] = "/bin/sh" |
| char | search [] = ":/bin:/usr/bin" |
| static struct region * | areabot |
| static struct region * | areatop |
| static struct region * | areanxt |
|
|
|
|
|
Definition at line 793 of file sh1.c. Referenced by initarea(). |
|
|
Definition at line 721 of file sh1.c. Referenced by cclass(), gmatch(), and selected(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 723 of file sh1.c. Referenced by gmatch(). |
|
|
|
|
|
Definition at line 789 of file sh1.c. Referenced by getcell(), and initarea(). |
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
Definition at line 366 of file sh1.c. Referenced by anys(), blank(), dodot(), dollar(), doread(), getprotoent(), getservent(), glob(), globname(), herein(), rexecve(), and yylex(). |
|
||||||||||||
|
Definition at line 353 of file sh1.c. References any(). Referenced by anyspcl(), expand(), and globname(). |
|
||||||||||||
|
Definition at line 646 of file sh1.c. References COPYV, cp, GETCELL, letnum(), letter(), lookup(), nameval(), NULL, and var::status. |
|
||||||||||||
|
Definition at line 764 of file sh1.c. References c, CMASK, d, NOT, and NULL. Referenced by gmatch(). |
|
|
Definition at line 666 of file sh1.c. References letnum(), and letter(). Referenced by rdexp(). |
|
|
|
|
||||||||||||
|
Definition at line 695 of file sh1.c. Referenced by lookup(). |
|
|
Definition at line 297 of file sh1.c. References closeall(), e, env::errpt, flag, env::iobase, env::iop, iostack, leave(), talking, and warn. |
|
|
Definition at line 619 of file sh1.c. References EXPORT. Referenced by doexport(), forkexec(), and main(). |
|
|
Definition at line 265 of file sh1.c. References failpt. |
|
|
|
|
|
Definition at line 902 of file sh1.c. References areabot, areatop, FREE, p, and top. Referenced by execute(), grave(), onecommand(), and run(). |
|
|
|
|
|
Definition at line 932 of file sh1.c. References areabot, areanum, areanxt, areatop, region::next, p, and top. |
|
|
Definition at line 925 of file sh1.c. Referenced by freehere(). |
|
|
Definition at line 825 of file sh1.c. References abort(), areanum, areanxt, i, region::next, p, and REGSIZE. |
|
||||||||||||
|
Definition at line 727 of file sh1.c. References cclass(), CMASK, NULL, pc, QMASK, and QUOTE. Referenced by find1case(), and globname(). |
|
|
Definition at line 813 of file sh1.c. References ALIGN, region::area, areabot, areanxt, areatop, BUSY, region::next, REGSIZE, and sbrk. Referenced by main(). |
|
|
|
|
||||||||||||
|
|
|
|
Definition at line 272 of file sh1.c. References execflg, exit(), exstat, fail, freehere(), runtrap(), and scraphere(). Referenced by do_getty(), doexit(), err(), execute(), main(), onecommand(), onintr(), and warn(). |
|
|
Definition at line 448 of file sh1.c. References digit, and letter(). Referenced by assign(), checkname(), dollar(), isassign(), and varput(). |
|
|
Definition at line 434 of file sh1.c. Referenced by assign(), checkname(), dollar(), isassign(), letnum(), and ronly(). |
|
|
Definition at line 521 of file sh1.c. References c, cp, digit, dolc, dolv, dummy, eqname(), var::name, var::next, null, RONLY, space(), and vlist. |
|
||||||||||||
|
Definition at line 40 of file sh1.c. References areanum, assign(), cflag, closeall(), COPYV, cprompt, environ, exit(), EXPORT, export(), filechar(), flag, geteuid, getpid, homedir, ifs, initarea(), int(), itoa(), linechar(), lookup(), newfile, nlchar(), null, NULL, path, prompt, PUSHIO, s, search, setval(), shell, shellname, SIG_DFL, talking, and var::value. |
|
||||||||||||||||
|
Definition at line 579 of file sh1.c. References cp, err, GETCELL, NULL, putc, RONLY, setarea(), space(), strlen(), and xfree(). |
|
|
Definition at line 312 of file sh1.c. References e, ep, errpt, env::errpt, fail, NULL, env::oenv, quitenv(), and space(). Referenced by eval(), expand(), herein(), readhere(), and run(). |
|
|
|
|
|
Definition at line 409 of file sh1.c. References filechar(), and PUSHIO. |
|
|
Definition at line 217 of file sh1.c. References areanum, brklist, e, env::errpt, execflg, execute(), failpt, flag, freearea(), freehere(), garbage(), i, inparse, intr, iolist, leave(), env::linep, m1, multiline, NOPIPE, env::oenv, outtree, quitenv(), runtrap(), scraphere(), setjmp, talking, trapset, wdlist, yynerrs, and yyparse(). Referenced by grave(). |
|
|
Definition at line 416 of file sh1.c. References execflg, fail, heedint, inparse, intr, leave(), onintr(), prs(), SIGINT, signal(), and talking. |
|
|
Definition at line 377 of file sh1.c. References itoa(). Referenced by doshift(), execute(), setstatus(), and tempname(). |
|
||||||||||||
|
Definition at line 678 of file sh1.c. References EXPORT, if(), var::name, var::next, RONLY, var::status, vlist, and write. Referenced by rdexp(). |
|
|
Definition at line 334 of file sh1.c. References close, DELETE, e, ep, env::iofd, NULL, and env::oenv. Referenced by expand(), herein(), newenv(), onecommand(), and run(). |
|
|
Definition at line 626 of file sh1.c. References letter(), and RONLY. Referenced by doreadonly(). |
|
|
Definition at line 499 of file sh1.c. References nlchar(), NULL, RUN, and trap. Referenced by execute(), leave(), and onecommand(). |
|
||||||||||||
|
Definition at line 914 of file sh1.c. References region::area, and p. |
|
|
|
|
||||||||||||
|
Definition at line 564 of file sh1.c. References nameval(), and NULL. Referenced by doread(), doshift(), execute(), main(), setdash(), and setstatus(). |
|
|
|
|
|
Definition at line 455 of file sh1.c. References cp, err, and getcell(). Referenced by doHELP(), generate(), getwords(), globname(), lookup(), markhere(), nameval(), newenv(), newword(), and strsave(). |
|
||||||||||||
|
|
|
|
|
|
|
Definition at line 482 of file sh1.c. References DELETE. Referenced by nameval(). |
|
|
Definition at line 808 of file sh1.c. Referenced by freearea(), garbage(), and initarea(). |
|
|
Definition at line 810 of file sh1.c. Referenced by freecell(), garbage(), getcell(), and initarea(). |
|
|
Definition at line 809 of file sh1.c. Referenced by freearea(), garbage(), and initarea(). |
|
|
Initial value: |
|
|
Definition at line 18 of file sh1.c. Referenced by dollar(), doread(), getc(), grave(), and yylex(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 15 of file sh1.c. Referenced by onecommand(), and onintr(). |
|
|
|
|
|
|
|
|
Definition at line 30 of file sh1.c. Referenced by __diff(), cmdcomp(), dec(), inc(), main(), SF(), and SR(). |
|
|
Definition at line 29 of file sh1.c. Referenced by f_pshinf(), and main(). |
1.4.6