/***********************************************************************1* *2* This software is part of the ast package *3* Copyright (c) 1982-2012 AT&T Intellectual Property *4* and is licensed under the *5* Eclipse Public License, Version 1.0 *6* by AT&T Intellectual Property *7* *8* A copy of the License is available at *9* http://www.eclipse.org/org/documents/epl-v10.html *10* (with md5 checksum b35adb5213ca9657e911e9befb180842) *11* *12* Information and Software Systems Research *13* AT&T Research *14* Florham Park NJ *15* *16* David Korn <[email protected]> *17* *18***********************************************************************/19#pragma prototyped20#ifndef _SHTABLE_H2122/*23* David Korn24* AT&T Labs25*26* Interface definitions read-only data tables for shell27*28*/2930#define _SHTABLE_H 13132typedef struct shtable133{34const char *sh_name;35const unsigned sh_number;36} Shtable_t;3738struct shtable239{40const char *sh_name;41const unsigned sh_number;42const char *sh_value;43};4445struct shtable346{47const char *sh_name;48const unsigned sh_number;49int (*sh_value)(int, char*[], Shbltin_t*);50};5152#define sh_lookup(name,value) (sh_locate(name,(Shtable_t*)(value),sizeof(*(value)))->sh_number)53extern const Shtable_t shtab_testops[];54extern const Shtable_t shtab_options[];55extern const Shtable_t shtab_attributes[];56extern const struct shtable2 shtab_variables[];57extern const struct shtable2 shtab_aliases[];58extern const struct shtable2 shtab_signals[];59extern const struct shtable3 shtab_builtins[];60extern const Shtable_t shtab_reserved[];61extern const Shtable_t *sh_locate(const char*, const Shtable_t*, int);62extern int sh_lookopt(const char*, int*);6364#endif /* SH_TABLE_H */656667