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