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#include <ast.h>
1N/A#include "FEATURE/options"
1N/A#include "FEATURE/dynamic"
1N/A#include <shell.h>
1N/A#include "shtable.h"
1N/A#include "name.h"
1N/A#include "defs.h"
1N/A#include "variables.h"
1N/A
1N/A/*
1N/A * This is the list of built-in shell variables and default values
1N/A * and default attributes.
1N/A */
1N/A
1N/Aconst struct shtable2 shtab_variables[] =
1N/A{
1N/A "PATH", 0, (char*)0,
1N/A "PS1", 0, (char*)0,
1N/A "PS2", NV_NOFREE, "> ",
1N/A "IFS", NV_NOFREE, " \t\n",
1N/A "PWD", 0, (char*)0,
1N/A "HOME", 0, (char*)0,
1N/A "MAIL", 0, (char*)0,
1N/A "REPLY", 0, (char*)0,
1N/A "SHELL", NV_NOFREE, "/bin/" SH_STD,
1N/A "EDITOR", 0, (char*)0,
1N/A "MAILCHECK", NV_NOFREE|NV_INTEGER, (char*)0,
1N/A "RANDOM", NV_NOFREE|NV_INTEGER, (char*)0,
1N/A "ENV", NV_NOFREE, (char*)0,
1N/A "HISTFILE", 0, (char*)0,
1N/A "HISTSIZE", 0, (char*)0,
1N/A "HISTEDIT", NV_NOFREE, (char*)0,
1N/A "HISTCMD", NV_NOFREE|NV_INTEGER, (char*)0,
1N/A "FCEDIT", NV_NOFREE, "/bin/ed",
1N/A "CDPATH", 0, (char*)0,
1N/A "MAILPATH", 0, (char*)0,
1N/A "PS3", NV_NOFREE, "#? ",
1N/A "OLDPWD", 0, (char*)0,
1N/A "VISUAL", 0, (char*)0,
1N/A "COLUMNS", 0, (char*)0,
1N/A "LINES", 0, (char*)0,
1N/A "PPID", NV_NOFREE|NV_INTEGER, (char*)0,
1N/A "_", NV_EXPORT, (char*)0,
1N/A "TMOUT", NV_NOFREE|NV_INTEGER, (char*)0,
1N/A "SECONDS", NV_NOFREE|NV_INTEGER|NV_DOUBLE, (char*)0,
1N/A "LINENO", NV_NOFREE|NV_INTEGER, (char*)0,
1N/A "OPTARG", 0, (char*)0,
1N/A "OPTIND", NV_NOFREE|NV_INTEGER, (char*)0,
1N/A "PS4", 0, (char*)0,
1N/A "FPATH", 0, (char*)0,
1N/A "LANG", 0, (char*)0,
1N/A "LC_ALL", 0, (char*)0,
1N/A "LC_COLLATE", 0, (char*)0,
1N/A "LC_CTYPE", 0, (char*)0,
1N/A "LC_MESSAGES", 0, (char*)0,
1N/A "LC_NUMERIC", 0, (char*)0,
1N/A "FIGNORE", 0, (char*)0,
1N/A "KSH_VERSION", 0, (char*)0,
1N/A "JOBMAX", NV_NOFREE|NV_INTEGER, (char*)0,
1N/A ".sh", NV_TABLE|NV_NOFREE|NV_NOPRINT, (char*)0,
1N/A ".sh.edchar", 0, (char*)0,
1N/A ".sh.edcol", 0, (char*)0,
1N/A ".sh.edtext", 0, (char*)0,
1N/A ".sh.edmode", 0, (char*)0,
1N/A ".sh.name", 0, (char*)0,
1N/A ".sh.subscript",0, (char*)0,
1N/A ".sh.value", 0, (char*)0,
1N/A ".sh.version", NV_NOFREE, (char*)(&e_version[10]),
1N/A ".sh.dollar", 0, (char*)0,
1N/A ".sh.match", 0, (char*)0,
1N/A ".sh.command", 0, (char*)0,
1N/A ".sh.file", 0, (char*)0,
1N/A ".sh.fun", 0, (char*)0,
1N/A ".sh.subshell", NV_INTEGER|NV_SHORT|NV_NOFREE, (char*)0,
1N/A ".sh.level", 0, (char*)0,
1N/A ".sh.lineno", NV_INTEGER, (char*)0,
1N/A ".sh.stats", 0, (char*)0,
1N/A ".sh.math", 0, (char*)0,
1N/A ".sh.pool", 0, (char*)0,
1N/A "SHLVL", NV_INTEGER|NV_NOFREE|NV_EXPORT, (char*)0,
1N/A#if SHOPT_FS_3D
1N/A "VPATH", 0, (char*)0,
1N/A#endif /* SHOPT_FS_3D */
1N/A#if SHOPT_MULTIBYTE
1N/A "CSWIDTH", 0, (char*)0,
1N/A#endif /* SHOPT_MULTIBYTE */
1N/A#ifdef apollo
1N/A "SYSTYPE", 0, (char*)0,
1N/A#endif /* apollo */
1N/A "", 0, (char*)0
1N/A};
1N/A
1N/Aconst char *nv_discnames[] = { "get", "set", "append", "unset", "getn", 0 };
1N/A
1N/A#ifdef SHOPT_STATS
1N/Aconst Shtable_t shtab_stats[] =
1N/A{
1N/A "arg_cachehits", STAT_ARGHITS,
1N/A "arg_expands", STAT_ARGEXPAND,
1N/A "comsubs", STAT_COMSUB,
1N/A "forks", STAT_FORKS,
1N/A "funcalls", STAT_FUNCT,
1N/A "globs", STAT_GLOBS,
1N/A "linesread", STAT_READS,
1N/A "nv_cachehit", STAT_NVHITS,
1N/A "nv_opens", STAT_NVOPEN,
1N/A "pathsearch", STAT_PATHS,
1N/A "posixfuncall", STAT_SVFUNCT,
1N/A "simplecmds", STAT_SCMDS,
1N/A "spawns", STAT_SPAWN,
1N/A "subshell", STAT_SUBSHELL
1N/A};
1N/A#endif /* SHOPT_STATS */
1N/A