xref: /aosp_15_r20/external/mksh/src/var_spec.h (revision 7c356e860f31eadd15fd599fcfdb9fd21f16a9d4)
1*7c356e86SAndroid Build Coastguard Worker /*-
2*7c356e86SAndroid Build Coastguard Worker  * Copyright (c) 2009, 2011, 2012, 2016, 2018
3*7c356e86SAndroid Build Coastguard Worker  *	mirabilos <[email protected]>
4*7c356e86SAndroid Build Coastguard Worker  *
5*7c356e86SAndroid Build Coastguard Worker  * Provided that these terms and disclaimer and all copyright notices
6*7c356e86SAndroid Build Coastguard Worker  * are retained or reproduced in an accompanying document, permission
7*7c356e86SAndroid Build Coastguard Worker  * is granted to deal in this work without restriction, including un-
8*7c356e86SAndroid Build Coastguard Worker  * limited rights to use, publicly perform, distribute, sell, modify,
9*7c356e86SAndroid Build Coastguard Worker  * merge, give away, or sublicence.
10*7c356e86SAndroid Build Coastguard Worker  *
11*7c356e86SAndroid Build Coastguard Worker  * This work is provided "AS IS" and WITHOUT WARRANTY of any kind, to
12*7c356e86SAndroid Build Coastguard Worker  * the utmost extent permitted by applicable law, neither express nor
13*7c356e86SAndroid Build Coastguard Worker  * implied; without malicious intent or gross negligence. In no event
14*7c356e86SAndroid Build Coastguard Worker  * may a licensor, author or contributor be held liable for indirect,
15*7c356e86SAndroid Build Coastguard Worker  * direct, other damage, loss, or other issues arising in any way out
16*7c356e86SAndroid Build Coastguard Worker  * of dealing in the work, even if advised of the possibility of such
17*7c356e86SAndroid Build Coastguard Worker  * damage or existence of a defect, except proven that it results out
18*7c356e86SAndroid Build Coastguard Worker  * of said person's immediate fault when using the work as intended.
19*7c356e86SAndroid Build Coastguard Worker  */
20*7c356e86SAndroid Build Coastguard Worker 
21*7c356e86SAndroid Build Coastguard Worker #if defined(VARSPEC_DEFNS)
22*7c356e86SAndroid Build Coastguard Worker __RCSID("$MirOS: src/bin/mksh/var_spec.h,v 1.11 2018/01/13 21:38:10 tg Exp $");
23*7c356e86SAndroid Build Coastguard Worker #define FN(name)			/* nothing */
24*7c356e86SAndroid Build Coastguard Worker #elif defined(VARSPEC_ENUMS)
25*7c356e86SAndroid Build Coastguard Worker #define FN(name)			V_##name,
26*7c356e86SAndroid Build Coastguard Worker #define F0(name)			V_##name = 0,
27*7c356e86SAndroid Build Coastguard Worker #elif defined(VARSPEC_ITEMS)
28*7c356e86SAndroid Build Coastguard Worker #define F0(name)			/* nothing */
29*7c356e86SAndroid Build Coastguard Worker #define FN(name)			#name,
30*7c356e86SAndroid Build Coastguard Worker #endif
31*7c356e86SAndroid Build Coastguard Worker 
32*7c356e86SAndroid Build Coastguard Worker #ifndef F0
33*7c356e86SAndroid Build Coastguard Worker #define F0 FN
34*7c356e86SAndroid Build Coastguard Worker #endif
35*7c356e86SAndroid Build Coastguard Worker 
36*7c356e86SAndroid Build Coastguard Worker /* NOTE: F0 are skipped for the ITEMS array, only FN generate names */
37*7c356e86SAndroid Build Coastguard Worker 
38*7c356e86SAndroid Build Coastguard Worker /* 0 is always V_NONE */
39*7c356e86SAndroid Build Coastguard Worker F0(NONE)
40*7c356e86SAndroid Build Coastguard Worker 
41*7c356e86SAndroid Build Coastguard Worker /* 1 and up are special variables */
42*7c356e86SAndroid Build Coastguard Worker FN(BASHPID)
43*7c356e86SAndroid Build Coastguard Worker #ifdef __OS2__
44*7c356e86SAndroid Build Coastguard Worker FN(BEGINLIBPATH)
45*7c356e86SAndroid Build Coastguard Worker #endif
46*7c356e86SAndroid Build Coastguard Worker FN(COLUMNS)
47*7c356e86SAndroid Build Coastguard Worker #ifdef __OS2__
48*7c356e86SAndroid Build Coastguard Worker FN(ENDLIBPATH)
49*7c356e86SAndroid Build Coastguard Worker #endif
50*7c356e86SAndroid Build Coastguard Worker FN(EPOCHREALTIME)
51*7c356e86SAndroid Build Coastguard Worker #if HAVE_PERSISTENT_HISTORY
52*7c356e86SAndroid Build Coastguard Worker FN(HISTFILE)
53*7c356e86SAndroid Build Coastguard Worker #endif
54*7c356e86SAndroid Build Coastguard Worker FN(HISTSIZE)
55*7c356e86SAndroid Build Coastguard Worker FN(IFS)
56*7c356e86SAndroid Build Coastguard Worker #ifdef MKSH_EARLY_LOCALE_TRACKING
57*7c356e86SAndroid Build Coastguard Worker FN(LANG)
58*7c356e86SAndroid Build Coastguard Worker FN(LC_ALL)
59*7c356e86SAndroid Build Coastguard Worker FN(LC_CTYPE)
60*7c356e86SAndroid Build Coastguard Worker #endif
61*7c356e86SAndroid Build Coastguard Worker #ifdef __OS2__
62*7c356e86SAndroid Build Coastguard Worker FN(LIBPATHSTRICT)
63*7c356e86SAndroid Build Coastguard Worker #endif
64*7c356e86SAndroid Build Coastguard Worker FN(LINENO)
65*7c356e86SAndroid Build Coastguard Worker FN(LINES)
66*7c356e86SAndroid Build Coastguard Worker FN(OPTIND)
67*7c356e86SAndroid Build Coastguard Worker FN(PATH)
68*7c356e86SAndroid Build Coastguard Worker FN(RANDOM)
69*7c356e86SAndroid Build Coastguard Worker FN(SECONDS)
70*7c356e86SAndroid Build Coastguard Worker #ifndef MKSH_NO_CMDLINE_EDITING
71*7c356e86SAndroid Build Coastguard Worker FN(TERM)
72*7c356e86SAndroid Build Coastguard Worker #endif
73*7c356e86SAndroid Build Coastguard Worker FN(TMOUT)
74*7c356e86SAndroid Build Coastguard Worker FN(TMPDIR)
75*7c356e86SAndroid Build Coastguard Worker 
76*7c356e86SAndroid Build Coastguard Worker #undef FN
77*7c356e86SAndroid Build Coastguard Worker #undef F0
78*7c356e86SAndroid Build Coastguard Worker #undef VARSPEC_DEFNS
79*7c356e86SAndroid Build Coastguard Worker #undef VARSPEC_ENUMS
80*7c356e86SAndroid Build Coastguard Worker #undef VARSPEC_ITEMS
81