386BSD 0.1 development
authorWilliam F. Jolitz <wjolitz@soda.berkeley.edu>
Thu, 20 Feb 1992 07:44:36 +0000 (23:44 -0800)
committerWilliam F. Jolitz <wjolitz@soda.berkeley.edu>
Thu, 20 Feb 1992 07:44:36 +0000 (23:44 -0800)
Work on file usr/src/bin/sh/builtins.h
Work on file usr/src/bin/sh/b.c

Co-Authored-By: Lynne Greer Jolitz <ljolitz@cardio.ucsf.edu>
Synthesized-from: 386BSD-0.1

usr/src/bin/sh/b.c [new file with mode: 0644]
usr/src/bin/sh/builtins.h [new file with mode: 0644]

diff --git a/usr/src/bin/sh/b.c b/usr/src/bin/sh/b.c
new file mode 100644 (file)
index 0000000..61f63b3
--- /dev/null
@@ -0,0 +1,102 @@
+/*
+ * This file was generated by the mkbuiltins program.
+ */
+
+#include "shell.h"
+#include "builtins.h"
+
+int bltincmd();
+int bgcmd();
+int breakcmd();
+int cdcmd();
+int dotcmd();
+int echocmd();
+int evalcmd();
+int execcmd();
+int exitcmd();
+int exportcmd();
+int fgcmd();
+int getoptscmd();
+int hashcmd();
+int jobidcmd();
+int jobscmd();
+int lccmd();
+int localcmd();
+int pwdcmd();
+int readcmd();
+int returncmd();
+int setcmd();
+int setvarcmd();
+int shiftcmd();
+int trapcmd();
+int truecmd();
+int umaskcmd();
+int unsetcmd();
+int waitcmd();
+
+int (*const builtinfunc[])() = {
+       bltincmd,
+       bgcmd,
+       breakcmd,
+       cdcmd,
+       dotcmd,
+       echocmd,
+       evalcmd,
+       execcmd,
+       exitcmd,
+       exportcmd,
+       fgcmd,
+       getoptscmd,
+       hashcmd,
+       jobidcmd,
+       jobscmd,
+       lccmd,
+       localcmd,
+       pwdcmd,
+       readcmd,
+       returncmd,
+       setcmd,
+       setvarcmd,
+       shiftcmd,
+       trapcmd,
+       truecmd,
+       umaskcmd,
+       unsetcmd,
+       waitcmd,
+};
+
+const struct builtincmd builtincmd[] = {
+       "command", 0,
+       "bg", 1,
+       "break", 2,
+       "continue", 2,
+       "cd", 3,
+       "chdir", 3,
+       ".", 4,
+       "echo", 5,
+       "eval", 6,
+       "exec", 7,
+       "exit", 8,
+       "export", 9,
+       "readonly", 9,
+       "fg", 10,
+       "getopts", 11,
+       "hash", 12,
+       "jobid", 13,
+       "jobs", 14,
+       "lc", 15,
+       "local", 16,
+       "pwd", 17,
+       "read", 18,
+       "return", 19,
+       "set", 20,
+       "setvar", 21,
+       "shift", 22,
+       "trap", 23,
+       ":", 24,
+       "true", 24,
+       "umask", 25,
+       "unset", 26,
+       "wait", 27,
+       NULL, 0
+};
diff --git a/usr/src/bin/sh/builtins.h b/usr/src/bin/sh/builtins.h
new file mode 100644 (file)
index 0000000..bcdfd3b
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * This file was generated by the mkbuiltins program.
+ */
+
+#include <sys/cdefs.h>
+#define BLTINCMD 0
+#define BGCMD 1
+#define BREAKCMD 2
+#define CDCMD 3
+#define DOTCMD 4
+#define ECHOCMD 5
+#define EVALCMD 6
+#define EXECCMD 7
+#define EXITCMD 8
+#define EXPORTCMD 9
+#define FGCMD 10
+#define GETOPTSCMD 11
+#define HASHCMD 12
+#define JOBIDCMD 13
+#define JOBSCMD 14
+#define LCCMD 15
+#define LOCALCMD 16
+#define PWDCMD 17
+#define READCMD 18
+#define RETURNCMD 19
+#define SETCMD 20
+#define SETVARCMD 21
+#define SHIFTCMD 22
+#define TRAPCMD 23
+#define TRUECMD 24
+#define UMASKCMD 25
+#define UNSETCMD 26
+#define WAITCMD 27
+
+struct builtincmd {
+      char *name;
+      int code;
+};
+
+extern int (*const builtinfunc[])();
+extern const struct builtincmd builtincmd[];