include file pass, csh.h no longer include every .h in the system
[unix-history] / usr / src / bin / csh / init.c
CommitLineData
ecc449eb
KB
1/*-
2 * Copyright (c) 1980, 1991 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * %sccs.include.redist.c%
b79f4fa9
DF
6 */
7
35371dec 8#ifndef lint
0aec749d 9static char sccsid[] = "@(#)init.c 5.10 (Berkeley) %G%";
ecc449eb 10#endif /* not lint */
90503b97 11
4d7b2685 12#include "csh.h"
4d7b2685 13#include "extern.h"
90503b97
BJ
14
15#define INF 1000
16
6e37afca
KB
17struct biltins bfunc[] =
18{
19 "@", dolet, 0, INF,
20 "alias", doalias, 0, INF,
21 "alloc", showall, 0, 1,
22 "bg", dobg, 0, INF,
23 "break", dobreak, 0, 0,
24 "breaksw", doswbrk, 0, 0,
25 "case", dozip, 0, 1,
26 "cd", dochngd, 0, INF,
27 "chdir", dochngd, 0, INF,
28 "continue", docontin, 0, 0,
29 "default", dozip, 0, 0,
30 "dirs", dodirs, 0, INF,
31 "echo", doecho, 0, INF,
32 "else", doelse, 0, INF,
33 "end", doend, 0, 0,
34 "endif", dozip, 0, 0,
35 "endsw", dozip, 0, 0,
36 "eval", doeval, 0, INF,
37 "exec", execash, 1, INF,
38 "exit", doexit, 0, INF,
39 "fg", dofg, 0, INF,
40 "foreach", doforeach, 3, INF,
41 "glob", doglob, 0, INF,
42 "goto", dogoto, 1, 1,
6e37afca 43 "hashstat", hashstat, 0, 0,
6e37afca
KB
44 "history", dohist, 0, 2,
45 "if", doif, 1, INF,
46 "jobs", dojobs, 0, 1,
47 "kill", dokill, 1, INF,
48 "limit", dolimit, 0, 3,
49 "linedit", doecho, 0, INF,
50 "login", dologin, 0, 1,
51 "logout", dologout, 0, 0,
52 "nice", donice, 0, INF,
53 "nohup", donohup, 0, INF,
54 "notify", donotify, 0, INF,
55 "onintr", doonintr, 0, 2,
56 "popd", dopopd, 0, INF,
57 "pushd", dopushd, 0, INF,
58 "rehash", dohash, 0, 0,
59 "repeat", dorepeat, 2, INF,
60 "set", doset, 0, INF,
61 "setenv", dosetenv, 0, 2,
62 "shift", shift, 0, 1,
63 "source", dosource, 1, 2,
64 "stop", dostop, 1, INF,
65 "suspend", dosuspend, 0, 0,
66 "switch", doswitch, 1, INF,
67 "time", dotime, 0, INF,
68 "umask", doumask, 0, 1,
69 "unalias", unalias, 1, INF,
70 "unhash", dounhash, 0, 0,
71 "unlimit", dounlimit, 0, INF,
72 "unset", unset, 1, INF,
73 "unsetenv", dounsetenv, 1, INF,
74 "wait", dowait, 0, 0,
75 "while", dowhile, 1, INF,
90503b97 76};
6e37afca 77int nbfunc = sizeof bfunc / sizeof *bfunc;
90503b97 78
6e37afca
KB
79struct srch srchn[] =
80{
81 "@", T_LET,
82 "break", T_BREAK,
83 "breaksw", T_BRKSW,
84 "case", T_CASE,
85 "default", T_DEFAULT,
86 "else", T_ELSE,
87 "end", T_END,
88 "endif", T_ENDIF,
89 "endsw", T_ENDSW,
90 "exit", T_EXIT,
91 "foreach", T_FOREACH,
92 "goto", T_GOTO,
93 "if", T_IF,
94 "label", T_LABEL,
95 "set", T_SET,
96 "switch", T_SWITCH,
97 "while", T_WHILE,
90503b97 98};
6e37afca 99int nsrchn = sizeof srchn / sizeof *srchn;
90503b97 100
6e37afca
KB
101struct mesg mesg[] =
102{
103 /* 0 */ 0, "",
104 /* 1 */ "HUP", "Hangup",
105 /* 2 */ "INT", "Interrupt",
106 /* 3 */ "QUIT", "Quit",
107 /* 4 */ "ILL", "Illegal instruction",
108 /* 5 */ "TRAP", "Trace/BPT trap",
109 /* 6 */ "IOT", "IOT trap",
110 /* 7 */ "EMT", "EMT trap",
111 /* 8 */ "FPE", "Floating exception",
112 /* 9 */ "KILL", "Killed",
113 /* 10 */ "BUS", "Bus error",
114 /* 11 */ "SEGV", "Segmentation fault",
115 /* 12 */ "SYS", "Bad system call",
116 /* 13 */ "PIPE", "Broken pipe",
117 /* 14 */ "ALRM", "Alarm clock",
118 /* 15 */ "TERM", "Terminated",
119 /* 16 */ "URG", "Urgent condition on IO channel",
120 /* 17 */ "STOP", "Suspended (signal)",
121 /* 18 */ "TSTP", "Suspended",
122 /* 19 */ "CONT", "Continued",
123 /* 20 */ "CHLD", "Child exited",
124 /* 21 */ "TTIN", "Suspended (tty input)",
125 /* 22 */ "TTOU", "Suspended (tty output)",
126 /* 23 */ "IO", "IO possible interrupt",
127 /* 24 */ "XCPU", "Cputime limit exceeded",
128 /* 25 */ "XFSZ", "Filesize limit exceeded",
129 /* 26 */ "VTALRM", "Virtual time alarm",
130 /* 27 */ "PROF", "Profiling time alarm",
131 /* 28 */ "WINCH", "Window changed",
132 /* 29 */ "INFO", "Information request",
133 /* 30 */ "USR1", "User signal 1",
134 /* 31 */ "USR2", "User signal 2",
135 /* 32 */ 0, "Signal 32",
90503b97 136};