/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1985-2012 AT&T Intellectual Property *
* and is licensed under the *
* Eclipse Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* David Korn <dgk@research.att.com> *
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
#pragma prototyped
/*
* ksh builtin command api
*/
#ifndef _SHCMD_H
#ifndef AST_PLUGIN_VERSION
#define AST_PLUGIN_VERSION(v) (v)
#endif
#if __STDC__
#else
#endif
#ifndef SH_VERSION
# define Shell_t void
#endif
#ifndef NV_DEFAULT
# define Namval_t void
#endif
struct Shbltin_s;
#ifdef _SHTABLE_H /* pre-ksh93u+ -- obsolete */
typedef int (*Shbltin_f)(int, char**, void*);
#else
#endif /* _SHTABLE_H */
struct Shbltin_s
{
void* ptr;
int version;
int (*shrun)(int, char**);
int (*shtrap)(const char*, int);
void (*shexit)(int);
unsigned char notify;
unsigned char sigset;
unsigned char nosfio;
char* data;
int flags;
char* (*shgetenv)(const char*);
char* (*shsetenv)(const char*);
int invariant;
};
#if defined(SH_VERSION) || defined(_SH_PRIVATE)
#else
# if defined(SFIO_VERSION) || defined(_AST_H)
# define LIB_INIT(c)
# else
# endif
# ifndef _CMD_H
# ifndef ERROR_NOTIFY
# endif
# endif
#endif
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
extern int astintercept(Shbltin_t*, int);
#undef extern
#endif