xref: /titanic_41/usr/src/lib/libshell/common/data/variables.c (revision d29b2c4438482eb00488be49a1f5d6835f455546)
1 /***********************************************************************
2 *                                                                      *
3 *               This software is part of the ast package               *
4 *           Copyright (c) 1982-2007 AT&T Knowledge Ventures            *
5 *                      and is licensed under the                       *
6 *                  Common Public License, Version 1.0                  *
7 *                      by AT&T Knowledge Ventures                      *
8 *                                                                      *
9 *                A copy of the License is available at                 *
10 *            http://www.opensource.org/licenses/cpl1.0.txt             *
11 *         (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9)         *
12 *                                                                      *
13 *              Information and Software Systems Research               *
14 *                            AT&T Research                             *
15 *                           Florham Park NJ                            *
16 *                                                                      *
17 *                  David Korn <dgk@research.att.com>                   *
18 *                                                                      *
19 ***********************************************************************/
20 #pragma prototyped
21 
22 #include	<ast.h>
23 #include	"FEATURE/options"
24 #include	"FEATURE/dynamic"
25 #include	<shell.h>
26 #include	"shtable.h"
27 #include	"name.h"
28 #include	"defs.h"
29 
30 /*
31  * This is the list of built-in shell variables and default values
32  * and default attributes.
33  */
34 
35 const struct shtable2 shtab_variables[] =
36 {
37 	"PATH",		0,				(char*)0,
38 	"PS1",		0,				(char*)0,
39 	"PS2",		NV_NOFREE, 			"> ",
40 	"IFS",		NV_NOFREE, 			" \t\n",
41 	"PWD",		0,				(char*)0,
42 	"HOME",		0,				(char*)0,
43 	"MAIL",		0,				(char*)0,
44 	"REPLY",	0,				(char*)0,
45 	"SHELL",	NV_NOFREE,			"/bin/" SH_STD,
46 	"EDITOR",	0,				(char*)0,
47 	"MAILCHECK",	NV_NOFREE|NV_INTEGER,		(char*)0,
48 	"RANDOM",	NV_NOFREE|NV_INTEGER,		(char*)0,
49 	"ENV",		NV_NOFREE,			"$HOME/.kshrc",
50 	"HISTFILE",	0,				(char*)0,
51 	"HISTSIZE",	0,				(char*)0,
52 	"HISTEDIT",	NV_NOFREE,			(char*)0,
53 	"HISTCMD",	NV_NOFREE|NV_INTEGER,		(char*)0,
54 	"FCEDIT",	NV_NOFREE,			"/bin/ed",
55 	"CDPATH",	0,				(char*)0,
56 	"MAILPATH",	0,				(char*)0,
57 	"PS3",		NV_NOFREE, 			"#? ",
58 	"OLDPWD",	0,				(char*)0,
59 	"VISUAL",	0,				(char*)0,
60 	"COLUMNS",	0,				(char*)0,
61 	"LINES",	0,				(char*)0,
62 	"PPID",		NV_NOFREE|NV_INTEGER,		(char*)0,
63 	"_",		NV_EXPORT,			(char*)0,
64 	"TMOUT",	NV_NOFREE|NV_INTEGER,		(char*)0,
65 	"SECONDS",	NV_NOFREE|NV_INTEGER|NV_DOUBLE,	(char*)0,
66 	"LINENO",	NV_NOFREE|NV_INTEGER,		(char*)0,
67 	"OPTARG",	0,				(char*)0,
68 	"OPTIND",	NV_NOFREE|NV_INTEGER,		(char*)0,
69 	"PS4",		0,				(char*)0,
70 	"FPATH",	0,				(char*)0,
71 	"LANG",		0,				(char*)0,
72 	"LC_ALL",	0,				(char*)0,
73 	"LC_COLLATE",	0,				(char*)0,
74 	"LC_CTYPE",	0,				(char*)0,
75 	"LC_MESSAGES",	0,				(char*)0,
76 	"LC_NUMERIC",	0,				(char*)0,
77 	"FIGNORE",	0,				(char*)0,
78 	".sh",		NV_TABLE|NV_RDONLY|NV_NOFREE|NV_NOPRINT,(char*)0,
79 	".sh.edchar",	0,				(char*)0,
80 	".sh.edcol",	0,				(char*)0,
81 	".sh.edtext",	0,				(char*)0,
82 	".sh.edmode",	0,				(char*)0,
83 	".sh.name",	0,				(char*)0,
84 	".sh.subscript",0,				(char*)0,
85 	".sh.value",	0,				(char*)0,
86 	".sh.version",	NV_NOFREE,			(char*)(&e_version[10]),
87 	".sh.dollar",	0,				(char*)0,
88 	".sh.match",	0,				(char*)0,
89 	".sh.command",	0,				(char*)0,
90 	".sh.file",	0,				(char*)0,
91 	".sh.fun",	0,				(char*)0,
92 	".sh.subshell",	NV_INTEGER|NV_SHORT|NV_NOFREE,	(char*)0,
93 	".sh.level",	0,				(char*)0,
94 #if SHOPT_FS_3D
95 	"VPATH",	0,				(char*)0,
96 #endif /* SHOPT_FS_3D */
97 #if SHOPT_MULTIBYTE
98 	"CSWIDTH",	0,				(char*)0,
99 #endif /* SHOPT_MULTIBYTE */
100 #ifdef apollo
101 	"SYSTYPE",	0,				(char*)0,
102 #endif /* apollo */
103 	"",	0,					(char*)0
104 };
105 
106