1N/A/***********************************************************************
1N/A* *
1N/A* This software is part of the ast package *
1N/A* Copyright (c) 1982-2011 AT&T Intellectual Property *
1N/A* and is licensed under the *
1N/A* Common Public License, Version 1.0 *
1N/A* by AT&T Intellectual Property *
1N/A* *
1N/A* A copy of the License is available at *
1N/A* http://www.opensource.org/licenses/cpl1.0.txt *
1N/A* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
1N/A* *
1N/A* Information and Software Systems Research *
1N/A* AT&T Research *
1N/A* Florham Park NJ *
1N/A* *
1N/A* David Korn <dgk@research.att.com> *
1N/A* *
1N/A***********************************************************************/
1N/A#pragma prototyped
1N/A
1N/A#ifndef SYSDECLARE
1N/A
1N/A#include <option.h>
1N/A#include "FEATURE/options"
1N/A#include "FEATURE/dynamic"
1N/A#include "shtable.h"
1N/A
1N/A#define SYSLOGIN (shgd->bltin_cmds)
1N/A#define SYSEXEC (shgd->bltin_cmds+1)
1N/A#define SYSSET (shgd->bltin_cmds+2)
1N/A#define SYSTRUE (shgd->bltin_cmds+4)
1N/A#define SYSCOMMAND (shgd->bltin_cmds+5)
1N/A#define SYSCD (shgd->bltin_cmds+6)
1N/A#define SYSBREAK (shgd->bltin_cmds+7)
1N/A#define SYSCONT (shgd->bltin_cmds+8)
1N/A#define SYSTYPESET (shgd->bltin_cmds+9)
1N/A#define SYSTEST (shgd->bltin_cmds+10)
1N/A#define SYSBRACKET (shgd->bltin_cmds+11)
1N/A#define SYSLET (shgd->bltin_cmds+12)
1N/A#define SYSEXPORT (shgd->bltin_cmds+13)
1N/A#define SYSDOT (shgd->bltin_cmds+14)
1N/A#define SYSRETURN (shgd->bltin_cmds+15)
1N/A#if SHOPT_BASH
1N/A# define SYSLOCAL (shgd->bltin_cmds+16)
1N/A#else
1N/A# define SYSLOCAL 0
1N/A#endif
1N/A
1N/A/* entry point for shell special builtins */
1N/A
1N/A#if _BLD_shell && defined(__EXPORT__)
1N/A# define extern __EXPORT__
1N/A#endif
1N/A
1N/Aextern int b_alias(int, char*[],void*);
1N/Aextern int b_break(int, char*[],void*);
1N/Aextern int b_dot_cmd(int, char*[],void*);
1N/Aextern int b_enum(int, char*[],void*);
1N/Aextern int b_exec(int, char*[],void*);
1N/Aextern int b_eval(int, char*[],void*);
1N/Aextern int b_return(int, char*[],void*);
1N/Aextern int B_login(int, char*[],void*);
1N/Aextern int b_true(int, char*[],void*);
1N/Aextern int b_false(int, char*[],void*);
1N/Aextern int b_readonly(int, char*[],void*);
1N/Aextern int b_set(int, char*[],void*);
1N/Aextern int b_shift(int, char*[],void*);
1N/Aextern int b_trap(int, char*[],void*);
1N/Aextern int b_typeset(int, char*[],void*);
1N/Aextern int b_unset(int, char*[],void*);
1N/Aextern int b_unalias(int, char*[],void*);
1N/A
1N/A/* The following are for job control */
1N/A#if defined(SIGCLD) || defined(SIGCHLD)
1N/A extern int b_jobs(int, char*[],void*);
1N/A extern int b_kill(int, char*[],void*);
1N/A# ifdef SIGTSTP
1N/A extern int b_bg(int, char*[],void*);
1N/A# endif /* SIGTSTP */
1N/A#endif
1N/A
1N/A/* The following utilities are built-in because of side-effects */
1N/Aextern int b_builtin(int, char*[],void*);
1N/Aextern int b_cd(int, char*[],void*);
1N/Aextern int b_command(int, char*[],void*);
1N/Aextern int b_getopts(int, char*[],void*);
1N/Aextern int b_hist(int, char*[],void*);
1N/Aextern int b_let(int, char*[],void*);
1N/Aextern int b_read(int, char*[],void*);
1N/Aextern int b_ulimit(int, char*[],void*);
1N/Aextern int b_umask(int, char*[],void*);
1N/A#ifdef _cmd_universe
1N/A extern int b_universe(int, char*[],void*);
1N/A#endif /* _cmd_universe */
1N/A#if SHOPT_FS_3D
1N/A extern int b_vpath(int, char*[],void*);
1N/A#endif /* SHOPT_FS_3D */
1N/Aextern int b_wait(int, char*[],void*);
1N/Aextern int b_whence(int, char*[],void*);
1N/A
1N/Aextern int b_alarm(int, char*[],void*);
1N/Aextern int b_print(int, char*[],void*);
1N/Aextern int b_printf(int, char*[],void*);
1N/Aextern int b_pwd(int, char*[],void*);
1N/Aextern int b_sleep(int, char*[],void*);
1N/Aextern int b_test(int, char*[],void*);
1N/A#if !SHOPT_ECHOPRINT
1N/A extern int B_echo(int, char*[],void*);
1N/A#endif /* SHOPT_ECHOPRINT */
1N/A
1N/A#undef extern
1N/A
1N/Aextern const char e_alrm1[];
1N/Aextern const char e_alrm2[];
1N/Aextern const char e_badfun[];
1N/Aextern const char e_baddisc[];
1N/Aextern const char e_nofork[];
1N/Aextern const char e_nosignal[];
1N/Aextern const char e_nolabels[];
1N/Aextern const char e_notimp[];
1N/Aextern const char e_nosupport[];
1N/Aextern const char e_badbase[];
1N/Aextern const char e_overlimit[];
1N/A
1N/Aextern const char e_eneedsarg[];
1N/Aextern const char e_oneoperand[];
1N/Aextern const char e_toodeep[];
1N/Aextern const char e_badname[];
1N/Aextern const char e_badsyntax[];
1N/A#ifdef _cmd_universe
1N/A extern const char e_nouniverse[];
1N/A#endif /* _cmd_universe */
1N/Aextern const char e_histopen[];
1N/Aextern const char e_condition[];
1N/Aextern const char e_badrange[];
1N/Aextern const char e_trap[];
1N/Aextern const char e_direct[];
1N/Aextern const char e_defedit[];
1N/Aextern const char e_cneedsarg[];
1N/Aextern const char e_defined[];
1N/A#if SHOPT_FS_3D
1N/A extern const char e_cantset[];
1N/A extern const char e_cantget[];
1N/A extern const char e_mapping[];
1N/A extern const char e_versions[];
1N/A#endif /* SHOPT_FS_3D */
1N/A
1N/A/* for option parsing */
1N/Aextern const char sh_set[];
1N/Aextern const char sh_optalarm[];
1N/Aextern const char sh_optalias[];
1N/Aextern const char sh_optbreak[];
1N/Aextern const char sh_optbuiltin[];
1N/Aextern const char sh_optcd[];
1N/Aextern const char sh_optcommand[];
1N/Aextern const char sh_optcont[];
1N/Aextern const char sh_optdot[];
1N/A#ifndef ECHOPRINT
1N/A extern const char sh_optecho[];
1N/A#endif /* !ECHOPRINT */
1N/Aextern const char sh_opteval[];
1N/Aextern const char sh_optexec[];
1N/Aextern const char sh_optexit[];
1N/Aextern const char sh_optexport[];
1N/Aextern const char sh_optgetopts[];
1N/Aextern const char sh_optbg[];
1N/Aextern const char sh_optdisown[];
1N/Aextern const char sh_optfg[];
1N/Aextern const char sh_opthist[];
1N/Aextern const char sh_optjobs[];
1N/Aextern const char sh_optkill[];
1N/Aextern const char sh_optksh[];
1N/Aextern const char sh_optlet[];
1N/Aextern const char sh_optprint[];
1N/Aextern const char sh_optprintf[];
1N/Aextern const char sh_optpwd[];
1N/Aextern const char sh_optread[];
1N/Aextern const char sh_optreadonly[];
1N/Aextern const char sh_optreturn[];
1N/Aextern const char sh_optset[];
1N/Aextern const char sh_optshift[];
1N/Aextern const char sh_optsleep[];
1N/Aextern const char sh_opttrap[];
1N/Aextern const char sh_opttypeset[];
1N/Aextern const char sh_optulimit[];
1N/Aextern const char sh_optumask[];
1N/Aextern const char sh_optunalias[];
1N/Aextern const char sh_optwait[];
1N/A#ifdef _cmd_universe
1N/A extern const char sh_optuniverse[];
1N/A#endif /* _cmd_universe */
1N/Aextern const char sh_optunset[];
1N/A#if SHOPT_FS_3D
1N/A extern const char sh_optvpath[];
1N/A extern const char sh_optvmap[];
1N/A#endif /* SHOPT_FS_3D */
1N/Aextern const char sh_optwhence[];
1N/A#endif /* SYSDECLARE */
1N/A
1N/Aextern const char e_dict[];
1N/A