Skip to content

File by file Global State

Jake Hamby edited this page Jul 14, 2022 · 5 revisions

Global state variables and access functions

alias.c

arrayfunc.c

bashhist.c

break.c

builtins.c

common.c

complete.c

echo.c

error.c

evalfile.c

evalstring.c

exec.c

execute_cmd.c

findcmd.c

flags.c

funmap.c

getopt.c

glob.c

hashcmd.c

histexpand.c

histfile.c

history.c

histsearch.c

input.c

list.c

locale.c

Important system state

  • calls to setlocale()

Normal initialization

  • set_default_locale() called from early main()
    • sets default_locale to the original value of LC_ALL from return value of call to setlocale(LC_ALL, "")
    • calls bindtextdomain(PACKAGE, LOCALEDIR) and textdomain(PACKAGE)
    • sets locale_mb_cur_max to MB_CUR_MAX
    • sets locale_utf8locale to return value of locale_isutf8(default_locale)
    • sets locale_shiftstates to return value of mblen(NULL, 0).

Save for subshell

Load from parent

make_cmd.c

mbutil.c

misc.c

nojobs.c

pathexp.c

pcomplete.c

pcomplib.c

print_cmd.c

read.c

redir.c

regex.c

shell.c

Important system state

  • main() starts here, many global variables declared here

shift.c

sig.c

siglist.c

smatch.c

source.c

subst.c

syntax.c

tilde.c

trap.c

variables.c

version.c

vms_term.c

y.tab.c