1 /*********************************************************************** 2 * * 3 * This software is part of the ast package * 4 * Copyright (c) 1982-2011 AT&T Intellectual Property * 5 * and is licensed under the * 6 * Eclipse Public License, Version 1.0 * 7 * by AT&T Intellectual Property * 8 * * 9 * A copy of the License is available at * 10 * http://www.eclipse.org/org/documents/epl-v10.html * 11 * (with md5 checksum b35adb5213ca9657e911e9befb180842) * 12 * * 13 * Information and Software Systems Research * 14 * AT&T Research * 15 * Florham Park NJ * 16 * * 17 * David Korn <dgkorn@gmail.com> * 18 * * 19 ***********************************************************************/ 20 // 21 // Ksh - AT&T Labs 22 // Written by David Korn 23 // This file defines all the read/write shell global variables 24 // 25 #include "config_ast.h" // IWYU pragma: keep 26 27 #include <stddef.h> 28 #include <sys/types.h> 29 30 #include "cdt.h" 31 #include "defs.h" 32 #include "jobs.h" 33 #include "name.h" 34 35 Shell_t sh = {.shcomp = 0}; 36 struct jobs job = {.pwlist = NULL}; 37 Dtdisc_t _Nvdisc = {.key = offsetof(Namval_t, nvname), .size = -1, .comparf = nv_compare}; 38 struct shared *shgd = NULL; 39 int32_t sh_mailchk = 600; 40 41 // These two magic pointers are used to distinguish the purpose of the `extra` parameter of the 42 // `sh_addbuiltin()` function. It should be one of these two values, NULL, or a `Namfun_t*`. 43 static int _builtin_delete; 44 static int _builtin_disable; 45 void *const builtin_delete = &_builtin_delete; 46 void *const builtin_disable = &_builtin_disable; 47