da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/* : : generated by proto : : */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/***********************************************************************
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* This software is part of the ast package *
3e14f97f673e8a630f076077de35afdd43dc1587Roger A. Faulkner* Copyright (c) 1982-2010 AT&T Intellectual Property *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* and is licensed under the *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Common Public License, Version 1.0 *
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin* by AT&T Intellectual Property *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* A copy of the License is available at *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Information and Software Systems Research *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* AT&T Research *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Florham Park NJ *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* David Korn <dgk@research.att.com> *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin***********************************************************************/
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if !defined(__PROTO__)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if !defined(__LINKAGE__)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * David Korn
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * AT&T Labs
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Interface definitions for shell command language
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* _SH_PRIVATE */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/* options */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chintypedef struct
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin unsigned long v[4];
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chintypedef void (*Shinit_f) __PROTO__((Shell_t*, int));
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define SH_SUBSHARE 27 /* subshell shares state with parent */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * passed as flags to builtins in Nambltin_t struct when BLT_OPTIM is on
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/* The following type is used for error messages */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/* error messages */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Saves the state of the shell
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin unsigned char trapnote; /* set when trap/signal is pending */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* _SH_PRIVATE */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/* flags for sh_parse */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/* symbolic values for sh_iogetiop */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/* symbolic value for sh_fdnotify */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# endif /* _BLD_shell */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* _DLL */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern __MANGLE__ Dt_t *sh_bltin_tree __PROTO__((void));
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern __MANGLE__ Shell_t *sh_init __PROTO__((int,char*[],Shinit_f));
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern __MANGLE__ __V_ *sh_parse __PROTO__((Shell_t*, Sfio_t*,int));
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern __MANGLE__ int sh_trap __PROTO__((const char*,int));
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern __MANGLE__ int sh_fun __PROTO__((Namval_t*,Namval_t*, char*[]));
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern __MANGLE__ int sh_funscope __PROTO__((int,char*[],int(*)(__V_*),__V_*,int));
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern __MANGLE__ Sfio_t *sh_iogetiop __PROTO__((int,int));
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chinextern __MANGLE__ int sh_main __PROTO__((int, char*[], Shinit_f));
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chinextern __MANGLE__ int sh_run __PROTO__((int, char*[]));
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern __MANGLE__ void sh_menu __PROTO__((Sfio_t*, int, char*[]));
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern __MANGLE__ Namval_t *sh_addbuiltin __PROTO__((const char*, int(*)(int, char*[],__V_*), __V_*));
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern __MANGLE__ char *sh_fmtq __PROTO__((const char*));
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern __MANGLE__ char *sh_fmtqf __PROTO__((const char*, int, int));
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern __MANGLE__ Sfdouble_t sh_strnum __PROTO__((const char*, char**, int));
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern __MANGLE__ int sh_access __PROTO__((const char*,int));
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern __MANGLE__ int sh_fcntl __PROTO__((int, int, ...));
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern __MANGLE__ int (*sh_fdnotify __PROTO__((int(*)(int,int)))) __PROTO__((int,int));
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern __MANGLE__ Shell_t *sh_getinterp __PROTO__((void));
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern __MANGLE__ int sh_open __PROTO__((const char*, int, ...));
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern __MANGLE__ Sfio_t *sh_pathopen __PROTO__((const char*));
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern __MANGLE__ ssize_t sh_read __PROTO__((int, __V_*, size_t));
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern __MANGLE__ ssize_t sh_write __PROTO__((int, const __V_*, size_t));
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern __MANGLE__ off_t sh_seek __PROTO__((int, off_t, int));
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern __MANGLE__ __V_ *sh_waitnotify __PROTO__((Shwait_f));
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern __MANGLE__ Shscope_t *sh_getscope __PROTO__((int,int));
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern __MANGLE__ Shscope_t *sh_setscope __PROTO__((Shscope_t*));
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern __MANGLE__ unsigned long sh_isoption __PROTO__((int));
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern __MANGLE__ unsigned long sh_onoption __PROTO__((int));
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern __MANGLE__ unsigned long sh_offoption __PROTO__((int));
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinextern __MANGLE__ int sh_exec __PROTO__((const Shnode_t*,int));
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin extern __MANGLE__ __V_ **sh_getliblist __PROTO__((void));
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* SHOPT_DYNAMIC */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * direct access to sh is obsolete, use sh_getinterp() instead
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#if !defined(_SH_PRIVATE) && defined(__IMPORT__) && !defined(_BLD_shell)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* _DLL */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* !_SH_PRIVATE */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define SH_EXITMASK (SH_EXITSIG-1) /* normal exit status bits */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define SH_RUNPROG -1022 /* needs to be negative and < 256 */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* SH_INTERACTIVE */