diff --git a/CWRU/CWRU.chlog b/CWRU/CWRU.chlog
index 47862e7e..9e9b8d39 100644
--- a/CWRU/CWRU.chlog
+++ b/CWRU/CWRU.chlog
@@ -12721,3 +12721,39 @@ subst.c,subst.h
- expand_words: call expand_assignment_statements instead of
do_assignment_statements, remove some duplicate code
+ 2/25
+ ----
+print_cmd.c
+ - print_if_command: if we have just printed the `action' command,
+ and it ends with a here-document, fix indentation amount
+ Report and fix from Weixie Cui <523516579@qq.com>
+
+ 2/27
+ ----
+subst.c
+ - WEXP_DEFERVARS: new word expansion flag, means to defer assignment
+ statements until after other word expansions and redirections
+ - WEXP_POSIX: new flag set for expand_word_list_internal, means to
+ separate out the assignment statements but leave them in
+ SUBST_ASSIGN_VARLIST
+ - if STRICT_POSIX is defined, expand_words calls expand_word_list_internal
+ with WEXP_POSIX when in posix mode
+ - expand_word_list_internal: only call expand_assignment_statements if
+ WEXP_DEFERVARS is not set in EFLAGS. It can only be set if the shell
+ is compiled -DSTRICT_POSIX and in posix mode
+
+execute_cmd.c
+ - execute_null_command: if compiled -DSTRICT_POSIX and in posix mode,
+ expand assignment statements after performing redirections and only
+ if the redirections complete without errors
+ - execute_subshell_builtin_or_function,execute_builtin_or_function:
+ if compiled -DSTRICT_POSIX and in posix mode, expand assignment
+ statements after performing redirections and only if the
+ redirections complete without errors
+ - execute_simple_command: if compiled -DSTRICT_POSIX and in posix mode,
+ expand assignment statements after performing redirections and only
+ if the redirections complete without errors, and defer environment
+ creation until after calling expand_assignment_statements()
+
+
+
diff --git a/MANIFEST b/MANIFEST
index e33e075f..75706f96 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -533,6 +533,7 @@ m4/bison.m4 f
m4/c-bool.m4 f
m4/codeset.m4 f
m4/d-type.m4 f
+m4/environ.m4 f
m4/extern-inline.m4 f
m4/fcntl-o.m4 f
m4/flexmember.m4 f
diff --git a/POSIX b/POSIX
index baf12753..feb8ad6c 100644
--- a/POSIX
+++ b/POSIX
@@ -387,7 +387,13 @@ default even when in POSIX mode. Specifically:
entries if ‘FCEDIT’ is unset, rather than defaulting directly to
‘ed’. ‘fc’ uses ‘ed’ if ‘EDITOR’ is unset.
- 3. As noted above, Bash requires the ‘xpg_echo’ option to be enabled
+ 3. Bash does not perform redirections before expanding variable
+ assignments preceding a simple command; it does not allow the
+ redirections access to the results of the variable assignments, but
+ any side effects of expanding the redirections take place first.
+ If compiled in strict posix mode, Bash performs redirections first.
+
+ 4. As noted above, Bash requires the ‘xpg_echo’ option to be enabled
for the ‘echo’ builtin to be fully conformant.
Bash can be configured to be POSIX-conformant by default, by specifying
diff --git a/assoc.c b/assoc.c
index 5a8e8180..94cdf97a 100644
--- a/assoc.c
+++ b/assoc.c
@@ -278,6 +278,58 @@ assoc_subrange (HASH_TABLE *hash, arrayind_t start, arrayind_t nelem, int starsu
return (ret);
}
+/*
+ * Return a string whose elements are the members of array H beginning at
+ * the element with key START and ending with key END.
+ * Order is non-deterministic and determined by walking the hash table
+ * from beginning to end (assoc_to_word_list()).
+ * If START isn't found, this starts at the beginning of the list created
+ * from the hash table.
+ * If END isn't found, this returns START.
+ * If neither START nor END is found, this returns the first entry in the list.
+ * These semantics are compatible with the ksh93 ${assoc[k1..k2]} expansion.
+ */
+char *
+assoc_subslice (HASH_TABLE *hash, char *start, char *end, int starsub, int quoted, int pflags)
+{
+ WORD_LIST *l, *save, *h, *t;
+ int i, j;
+ char *ret;
+
+ if (assoc_empty (hash))
+ return ((char *)NULL);
+
+ save = l = assoc_to_word_list (hash);
+ if (save == 0)
+ return ((char *)NULL);
+
+ for (h = l; h; h = h->next)
+ if (STREQ (start, h->word->word))
+ break;
+
+ if (h == 0) /* XXX could return NULL here */
+ h = l;
+
+ for (t = h; t; t = t->next)
+ if (STREQ (end, t->word->word))
+ break;
+
+ /* XXX could leave it set to the last element by leaving t = 0 and not
+ messing around with t->next below */
+ if (t == 0)
+ t = h;
+
+ l = t->next;
+ t->next = (WORD_LIST *)NULL;
+
+ ret = string_list_pos_params (starsub ? '*' : '@', h, quoted, pflags);
+
+ t->next = l;
+
+ dispose_words (save);
+ return (ret);
+}
+
/* Substitute REP for each match of PAT in each element of hash table H,
qualified by FLAGS to say what kind of quoting to do. */
char *
diff --git a/assoc.h b/assoc.h
index 46dc0aef..beaea684 100644
--- a/assoc.h
+++ b/assoc.h
@@ -46,6 +46,7 @@ extern void assoc_remove (HASH_TABLE *, const char *);
extern char *assoc_reference (HASH_TABLE *, const char *);
extern char *assoc_subrange (HASH_TABLE *, arrayind_t, arrayind_t, int, int, int);
+extern char *assoc_subslice (HASH_TABLE *, char *, char *, int, int, int);
extern char *assoc_patsub (HASH_TABLE *, char *, char *, int);
extern char *assoc_modcase (HASH_TABLE *, char *, int, int);
diff --git a/builtins/common.c b/builtins/common.c
index 6f85c518..15a3b156 100644
--- a/builtins/common.c
+++ b/builtins/common.c
@@ -1052,7 +1052,7 @@ builtin_arrayref_flags (WORD_DESC *w, int baseflags)
# if 0
/* This is a little sketchier but handles quoted arguments. */
- if (array_expand_once && (t = strchr (w->word, '[')) && t[strlen(t) - 1] == ']')
+ if (array_expand_once && (t = strchr (w->word, '[')) && t[strlen(t) - 1] == ']')
vflags |= VA_ONEWORD|VA_NOEXPAND;
# endif
diff --git a/builtins/source.def b/builtins/source.def
index 5668951c..4e292a90 100644
--- a/builtins/source.def
+++ b/builtins/source.def
@@ -29,8 +29,8 @@ Read and execute commands from FILENAME in the current shell. If the
-p option is supplied, the PATH argument is treated as a colon-
separated list of directories to search for FILENAME. If -p is not
supplied, and the sourcepath shell option is enabled, 'source' searches
-$PATH to find FILENAME. If any ARGUMENTS are supplied, they become the
-positional parameters when FILENAME is executed.
+the directories in $PATH to find FILENAME. If any ARGUMENTS are supplied,
+they become the positional parameters when FILENAME is executed.
Exit Status:
Returns the status of the last command executed in FILENAME; fails if
@@ -47,8 +47,8 @@ Read and execute commands from FILENAME in the current shell. If the
-p option is supplied, the PATH argument is treated as a colon-
separated list of directories to search for FILENAME. If -p is not
supplied, and the sourcepath shell option is enabled, '.' searches
-$PATH to find FILENAME. If any ARGUMENTS are supplied, they become the
-positional parameters when FILENAME is executed.
+the directories in $PATH to find FILENAME. If any ARGUMENTS are supplied,
+they become the positional parameters when FILENAME is executed.
Exit Status:
Returns the status of the last command executed in FILENAME; fails if
diff --git a/configure b/configure
index 89b882e4..e6d2d741 100755
--- a/configure
+++ b/configure
@@ -7116,6 +7116,16 @@ fi
+# environ.m4
+# serial 8
+
+
+
+# Check if a variable is properly declared.
+# gt_CHECK_VAR_DECL(includes,variable)
+
+
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
printf %s "checking for an ANSI C-conforming const... " >&6; }
if test ${ac_cv_c_const+y}
@@ -9415,8 +9425,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \
LIBS=$save_LIBS
test $gl_pthread_api = yes && break
done
- echo "$as_me:9418: gl_pthread_api=$gl_pthread_api" >&5
- echo "$as_me:9419: LIBPTHREAD=$LIBPTHREAD" >&5
+ echo "$as_me:9428: gl_pthread_api=$gl_pthread_api" >&5
+ echo "$as_me:9429: LIBPTHREAD=$LIBPTHREAD" >&5
gl_pthread_in_glibc=no
# On Linux with glibc >= 2.34, libc contains the fully functional
@@ -9442,7 +9452,7 @@ rm -rf conftest*
;;
esac
- echo "$as_me:9445: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
+ echo "$as_me:9455: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
# Test for libpthread by looking for pthread_kill. (Not pthread_self,
# since it is defined as a macro on OSF/1.)
@@ -9620,7 +9630,7 @@ fi
fi
fi
- echo "$as_me:9623: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
+ echo "$as_me:9633: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
printf %s "checking whether POSIX threads API is available... " >&6; }
@@ -9867,8 +9877,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \
LIBS=$save_LIBS
test $gl_pthread_api = yes && break
done
- echo "$as_me:9870: gl_pthread_api=$gl_pthread_api" >&5
- echo "$as_me:9871: LIBPTHREAD=$LIBPTHREAD" >&5
+ echo "$as_me:9880: gl_pthread_api=$gl_pthread_api" >&5
+ echo "$as_me:9881: LIBPTHREAD=$LIBPTHREAD" >&5
gl_pthread_in_glibc=no
# On Linux with glibc >= 2.34, libc contains the fully functional
@@ -9894,7 +9904,7 @@ rm -rf conftest*
;;
esac
- echo "$as_me:9897: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
+ echo "$as_me:9907: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5
# Test for libpthread by looking for pthread_kill. (Not pthread_self,
# since it is defined as a macro on OSF/1.)
@@ -10072,7 +10082,7 @@ fi
fi
fi
- echo "$as_me:10075: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
+ echo "$as_me:10085: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
printf %s "checking whether POSIX threads API is available... " >&6; }
diff --git a/configure.ac b/configure.ac
index 5bee338a..c3f0d42d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,7 +5,7 @@ dnl report bugs to chet.ramey@case.edu
dnl
dnl Process this file with autoconf to produce a configure script.
-# Copyright (C) 1987-2025 Free Software Foundation, Inc.
+# Copyright (C) 1987-2026 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
@@ -783,6 +783,8 @@ m4_include([m4/host-cpu-c-abi.m4])
m4_include([m4/c-bool.m4])
m4_include([m4/d-type.m4])
+m4_include([m4/environ.m4])
+
dnl C compiler characteristics
AC_C_CONST
AC_C_INLINE
diff --git a/doc/bash.info b/doc/bash.info
index df5767c5..baf9c740 100644
--- a/doc/bash.info
+++ b/doc/bash.info
@@ -1,9 +1,9 @@
This is bash.info, produced by makeinfo version 7.2 from bashref.texi.
This text is a brief description of the features that are present in the
-Bash shell (version 5.3, 14 January 2026).
+Bash shell (version 5.3, 27 February 2026).
- This is Edition 5.3, last updated 14 January 2026, of ‘The GNU Bash
+ This is Edition 5.3, last updated 27 February 2026, of ‘The GNU Bash
Reference Manual’, for ‘Bash’, Version 5.3.
Copyright © 1988-2026 Free Software Foundation, Inc.
@@ -26,10 +26,10 @@ Bash Features
*************
This text is a brief description of the features that are present in the
-Bash shell (version 5.3, 14 January 2026). The Bash home page is
+Bash shell (version 5.3, 27 February 2026). The Bash home page is
.
- This is Edition 5.3, last updated 14 January 2026, of ‘The GNU Bash
+ This is Edition 5.3, last updated 27 February 2026, of ‘The GNU Bash
Reference Manual’, for ‘Bash’, Version 5.3.
Bash contains features that appear in other popular shells, and some
@@ -7774,7 +7774,8 @@ startup files.
builtins.
12. Tilde expansion is only performed on assignments preceding a
- command name, rather than on all assignment statements on the line.
+ command name, rather than on all assignment statements on the line,
+ unless the command is a declaration command.
13. While variable indirection is available, it may not be applied to
the ‘#’ and ‘?’ special parameters.
@@ -8062,7 +8063,13 @@ default even when in POSIX mode. Specifically:
entries if ‘FCEDIT’ is unset, rather than defaulting directly to
‘ed’. ‘fc’ uses ‘ed’ if ‘EDITOR’ is unset.
- 3. As noted above, Bash requires the ‘xpg_echo’ option to be enabled
+ 3. Bash does not perform redirections before expanding variable
+ assignments preceding a simple command; it does not allow the
+ redirections access to the results of the variable assignments, but
+ any side effects of expanding the redirections take place first.
+ If compiled in strict posix mode, Bash performs redirections first.
+
+ 4. As noted above, Bash requires the ‘xpg_echo’ option to be enabled
for the ‘echo’ builtin to be fully conformant.
Bash can be configured to be POSIX-conformant by default, by
@@ -13728,138 +13735,138 @@ D.5 Concept Index
Tag Table:
-Node: Top899
-Node: Introduction2838
-Node: What is Bash?3051
-Node: What is a shell?4184
-Node: Definitions6794
-Node: Basic Shell Features10121
-Node: Shell Syntax11345
-Node: Shell Operation12372
-Node: Quoting13663
-Node: Escape Character15001
-Node: Single Quotes15536
-Node: Double Quotes15885
-Node: ANSI-C Quoting17230
-Node: Locale Translation18624
-Node: Creating Internationalized Scripts20027
-Node: Comments24225
-Node: Shell Commands24992
-Node: Reserved Words25931
-Node: Simple Commands27074
-Node: Pipelines27736
-Node: Lists30992
-Node: Compound Commands32941
-Node: Looping Constructs33950
-Node: Conditional Constructs36499
-Node: Command Grouping51636
-Node: Coprocesses53128
-Node: GNU Parallel55814
-Node: Shell Functions56732
-Node: Shell Parameters65180
-Node: Positional Parameters70081
-Node: Special Parameters71171
-Node: Shell Expansions74632
-Node: Brace Expansion76821
-Node: Tilde Expansion80157
-Node: Shell Parameter Expansion83112
-Node: Command Substitution103759
-Node: Arithmetic Expansion107610
-Node: Process Substitution108786
-Node: Word Splitting109894
-Node: Filename Expansion112338
-Node: Pattern Matching115562
-Node: Quote Removal121328
-Node: Redirections121632
-Node: Executing Commands131888
-Node: Simple Command Expansion132555
-Node: Command Search and Execution134663
-Node: Command Execution Environment137107
-Node: Environment140633
-Node: Exit Status142536
-Node: Signals144595
-Node: Shell Scripts149543
-Node: Shell Builtin Commands152841
-Node: Bourne Shell Builtins155182
-Node: Bash Builtins181901
-Node: Modifying Shell Behavior219637
-Node: The Set Builtin219979
-Node: The Shopt Builtin231973
-Node: Special Builtins249026
-Node: Shell Variables250015
-Node: Bourne Shell Variables250449
-Node: Bash Variables252957
-Node: Bash Features292241
-Node: Invoking Bash293255
-Node: Bash Startup Files299839
-Node: Interactive Shells305081
-Node: What is an Interactive Shell?305489
-Node: Is this Shell Interactive?306151
-Node: Interactive Shell Behavior306975
-Node: Bash Conditional Expressions310736
-Node: Shell Arithmetic316153
-Node: Aliases319480
-Node: Arrays322614
-Node: The Directory Stack330317
-Node: Directory Stack Builtins331114
-Node: Controlling the Prompt335559
-Node: The Restricted Shell338443
-Node: Bash POSIX Mode341536
-Node: Shell Compatibility Mode360952
-Node: Job Control369959
-Node: Job Control Basics370416
-Node: Job Control Builtins376784
-Node: Job Control Variables383572
-Node: Command Line Editing384803
-Node: Introduction and Notation386506
-Node: Readline Interaction388858
-Node: Readline Bare Essentials390046
-Node: Readline Movement Commands391854
-Node: Readline Killing Commands392850
-Node: Readline Arguments394873
-Node: Searching395963
-Node: Readline Init File398206
-Node: Readline Init File Syntax399509
-Node: Conditional Init Constructs426460
-Node: Sample Init File430845
-Node: Bindable Readline Commands433965
-Node: Commands For Moving435503
-Node: Commands For History437967
-Node: Commands For Text443358
-Node: Commands For Killing447483
-Node: Numeric Arguments450271
-Node: Commands For Completion451423
-Node: Keyboard Macros457119
-Node: Miscellaneous Commands457820
-Node: Readline vi Mode465363
-Node: Programmable Completion466340
-Node: Programmable Completion Builtins476076
-Node: A Programmable Completion Example487813
-Node: Using History Interactively493158
-Node: Bash History Facilities493839
-Node: Bash History Builtins497574
-Node: History Interaction505169
-Node: Event Designators510119
-Node: Word Designators511697
-Node: Modifiers514089
-Node: Installing Bash516026
-Node: Basic Installation517142
-Node: Compilers and Options521018
-Node: Compiling For Multiple Architectures521768
-Node: Installation Names523521
-Node: Specifying the System Type525755
-Node: Sharing Defaults526501
-Node: Operation Controls527215
-Node: Optional Features528234
-Node: Reporting Bugs540957
-Node: Major Differences From The Bourne Shell542314
-Node: GNU Free Documentation License563741
-Node: Indexes588918
-Node: Builtin Index589369
-Node: Reserved Word Index596467
-Node: Variable Index598912
-Node: Function Index616325
-Node: Concept Index630458
+Node: Top901
+Node: Introduction2842
+Node: What is Bash?3055
+Node: What is a shell?4188
+Node: Definitions6798
+Node: Basic Shell Features10125
+Node: Shell Syntax11349
+Node: Shell Operation12376
+Node: Quoting13667
+Node: Escape Character15005
+Node: Single Quotes15540
+Node: Double Quotes15889
+Node: ANSI-C Quoting17234
+Node: Locale Translation18628
+Node: Creating Internationalized Scripts20031
+Node: Comments24229
+Node: Shell Commands24996
+Node: Reserved Words25935
+Node: Simple Commands27078
+Node: Pipelines27740
+Node: Lists30996
+Node: Compound Commands32945
+Node: Looping Constructs33954
+Node: Conditional Constructs36503
+Node: Command Grouping51640
+Node: Coprocesses53132
+Node: GNU Parallel55818
+Node: Shell Functions56736
+Node: Shell Parameters65184
+Node: Positional Parameters70085
+Node: Special Parameters71175
+Node: Shell Expansions74636
+Node: Brace Expansion76825
+Node: Tilde Expansion80161
+Node: Shell Parameter Expansion83116
+Node: Command Substitution103763
+Node: Arithmetic Expansion107614
+Node: Process Substitution108790
+Node: Word Splitting109898
+Node: Filename Expansion112342
+Node: Pattern Matching115566
+Node: Quote Removal121332
+Node: Redirections121636
+Node: Executing Commands131892
+Node: Simple Command Expansion132559
+Node: Command Search and Execution134667
+Node: Command Execution Environment137111
+Node: Environment140637
+Node: Exit Status142540
+Node: Signals144599
+Node: Shell Scripts149547
+Node: Shell Builtin Commands152845
+Node: Bourne Shell Builtins155186
+Node: Bash Builtins181905
+Node: Modifying Shell Behavior219641
+Node: The Set Builtin219983
+Node: The Shopt Builtin231977
+Node: Special Builtins249030
+Node: Shell Variables250019
+Node: Bourne Shell Variables250453
+Node: Bash Variables252961
+Node: Bash Features292245
+Node: Invoking Bash293259
+Node: Bash Startup Files299843
+Node: Interactive Shells305085
+Node: What is an Interactive Shell?305493
+Node: Is this Shell Interactive?306155
+Node: Interactive Shell Behavior306979
+Node: Bash Conditional Expressions310740
+Node: Shell Arithmetic316157
+Node: Aliases319484
+Node: Arrays322618
+Node: The Directory Stack330321
+Node: Directory Stack Builtins331118
+Node: Controlling the Prompt335563
+Node: The Restricted Shell338447
+Node: Bash POSIX Mode341540
+Node: Shell Compatibility Mode361356
+Node: Job Control370363
+Node: Job Control Basics370820
+Node: Job Control Builtins377188
+Node: Job Control Variables383976
+Node: Command Line Editing385207
+Node: Introduction and Notation386910
+Node: Readline Interaction389262
+Node: Readline Bare Essentials390450
+Node: Readline Movement Commands392258
+Node: Readline Killing Commands393254
+Node: Readline Arguments395277
+Node: Searching396367
+Node: Readline Init File398610
+Node: Readline Init File Syntax399913
+Node: Conditional Init Constructs426864
+Node: Sample Init File431249
+Node: Bindable Readline Commands434369
+Node: Commands For Moving435907
+Node: Commands For History438371
+Node: Commands For Text443762
+Node: Commands For Killing447887
+Node: Numeric Arguments450675
+Node: Commands For Completion451827
+Node: Keyboard Macros457523
+Node: Miscellaneous Commands458224
+Node: Readline vi Mode465767
+Node: Programmable Completion466744
+Node: Programmable Completion Builtins476480
+Node: A Programmable Completion Example488217
+Node: Using History Interactively493562
+Node: Bash History Facilities494243
+Node: Bash History Builtins497978
+Node: History Interaction505573
+Node: Event Designators510523
+Node: Word Designators512101
+Node: Modifiers514493
+Node: Installing Bash516430
+Node: Basic Installation517546
+Node: Compilers and Options521422
+Node: Compiling For Multiple Architectures522172
+Node: Installation Names523925
+Node: Specifying the System Type526159
+Node: Sharing Defaults526905
+Node: Operation Controls527619
+Node: Optional Features528638
+Node: Reporting Bugs541361
+Node: Major Differences From The Bourne Shell542718
+Node: GNU Free Documentation License564145
+Node: Indexes589322
+Node: Builtin Index589773
+Node: Reserved Word Index596871
+Node: Variable Index599316
+Node: Function Index616729
+Node: Concept Index630862
End Tag Table
diff --git a/doc/bashref.info b/doc/bashref.info
index c3af797c..6d97d8e9 100644
--- a/doc/bashref.info
+++ b/doc/bashref.info
@@ -2,9 +2,9 @@ This is bashref.info, produced by makeinfo version 7.2 from
bashref.texi.
This text is a brief description of the features that are present in the
-Bash shell (version 5.3, 14 January 2026).
+Bash shell (version 5.3, 27 February 2026).
- This is Edition 5.3, last updated 14 January 2026, of ‘The GNU Bash
+ This is Edition 5.3, last updated 27 February 2026, of ‘The GNU Bash
Reference Manual’, for ‘Bash’, Version 5.3.
Copyright © 1988-2026 Free Software Foundation, Inc.
@@ -27,10 +27,10 @@ Bash Features
*************
This text is a brief description of the features that are present in the
-Bash shell (version 5.3, 14 January 2026). The Bash home page is
+Bash shell (version 5.3, 27 February 2026). The Bash home page is
.
- This is Edition 5.3, last updated 14 January 2026, of ‘The GNU Bash
+ This is Edition 5.3, last updated 27 February 2026, of ‘The GNU Bash
Reference Manual’, for ‘Bash’, Version 5.3.
Bash contains features that appear in other popular shells, and some
@@ -7775,7 +7775,8 @@ startup files.
builtins.
12. Tilde expansion is only performed on assignments preceding a
- command name, rather than on all assignment statements on the line.
+ command name, rather than on all assignment statements on the line,
+ unless the command is a declaration command.
13. While variable indirection is available, it may not be applied to
the ‘#’ and ‘?’ special parameters.
@@ -8063,7 +8064,13 @@ default even when in POSIX mode. Specifically:
entries if ‘FCEDIT’ is unset, rather than defaulting directly to
‘ed’. ‘fc’ uses ‘ed’ if ‘EDITOR’ is unset.
- 3. As noted above, Bash requires the ‘xpg_echo’ option to be enabled
+ 3. Bash does not perform redirections before expanding variable
+ assignments preceding a simple command; it does not allow the
+ redirections access to the results of the variable assignments, but
+ any side effects of expanding the redirections take place first.
+ If compiled in strict posix mode, Bash performs redirections first.
+
+ 4. As noted above, Bash requires the ‘xpg_echo’ option to be enabled
for the ‘echo’ builtin to be fully conformant.
Bash can be configured to be POSIX-conformant by default, by
@@ -13729,138 +13736,138 @@ D.5 Concept Index
Tag Table:
-Node: Top902
-Node: Introduction2844
-Node: What is Bash?3060
-Node: What is a shell?4196
-Node: Definitions6809
-Node: Basic Shell Features10139
-Node: Shell Syntax11366
-Node: Shell Operation12396
-Node: Quoting13690
-Node: Escape Character15031
-Node: Single Quotes15569
-Node: Double Quotes15921
-Node: ANSI-C Quoting17269
-Node: Locale Translation18666
-Node: Creating Internationalized Scripts20072
-Node: Comments24273
-Node: Shell Commands25043
-Node: Reserved Words25985
-Node: Simple Commands27131
-Node: Pipelines27796
-Node: Lists31055
-Node: Compound Commands33007
-Node: Looping Constructs34019
-Node: Conditional Constructs36571
-Node: Command Grouping51711
-Node: Coprocesses53206
-Node: GNU Parallel55895
-Node: Shell Functions56816
-Node: Shell Parameters65267
-Node: Positional Parameters70171
-Node: Special Parameters71264
-Node: Shell Expansions74728
-Node: Brace Expansion76920
-Node: Tilde Expansion80259
-Node: Shell Parameter Expansion83217
-Node: Command Substitution103867
-Node: Arithmetic Expansion107721
-Node: Process Substitution108900
-Node: Word Splitting110011
-Node: Filename Expansion112458
-Node: Pattern Matching115685
-Node: Quote Removal121454
-Node: Redirections121761
-Node: Executing Commands132020
-Node: Simple Command Expansion132690
-Node: Command Search and Execution134801
-Node: Command Execution Environment137248
-Node: Environment140777
-Node: Exit Status142683
-Node: Signals144745
-Node: Shell Scripts149696
-Node: Shell Builtin Commands152997
-Node: Bourne Shell Builtins155341
-Node: Bash Builtins182063
-Node: Modifying Shell Behavior219802
-Node: The Set Builtin220147
-Node: The Shopt Builtin232144
-Node: Special Builtins249200
-Node: Shell Variables250192
-Node: Bourne Shell Variables250629
-Node: Bash Variables253140
-Node: Bash Features292427
-Node: Invoking Bash293444
-Node: Bash Startup Files300031
-Node: Interactive Shells305276
-Node: What is an Interactive Shell?305687
-Node: Is this Shell Interactive?306352
-Node: Interactive Shell Behavior307179
-Node: Bash Conditional Expressions310943
-Node: Shell Arithmetic316363
-Node: Aliases319693
-Node: Arrays322830
-Node: The Directory Stack330536
-Node: Directory Stack Builtins331336
-Node: Controlling the Prompt335784
-Node: The Restricted Shell338671
-Node: Bash POSIX Mode341767
-Node: Shell Compatibility Mode361186
-Node: Job Control370196
-Node: Job Control Basics370656
-Node: Job Control Builtins377027
-Node: Job Control Variables383818
-Node: Command Line Editing385052
-Node: Introduction and Notation386758
-Node: Readline Interaction389113
-Node: Readline Bare Essentials390304
-Node: Readline Movement Commands392115
-Node: Readline Killing Commands393114
-Node: Readline Arguments395140
-Node: Searching396233
-Node: Readline Init File398479
-Node: Readline Init File Syntax399785
-Node: Conditional Init Constructs426739
-Node: Sample Init File431127
-Node: Bindable Readline Commands434250
-Node: Commands For Moving435791
-Node: Commands For History438258
-Node: Commands For Text443652
-Node: Commands For Killing447780
-Node: Numeric Arguments450571
-Node: Commands For Completion451726
-Node: Keyboard Macros457425
-Node: Miscellaneous Commands458129
-Node: Readline vi Mode465675
-Node: Programmable Completion466655
-Node: Programmable Completion Builtins476394
-Node: A Programmable Completion Example488134
-Node: Using History Interactively493482
-Node: Bash History Facilities494166
-Node: Bash History Builtins497904
-Node: History Interaction505502
-Node: Event Designators510455
-Node: Word Designators512036
-Node: Modifiers514431
-Node: Installing Bash516371
-Node: Basic Installation517490
-Node: Compilers and Options521369
-Node: Compiling For Multiple Architectures522122
-Node: Installation Names523878
-Node: Specifying the System Type526115
-Node: Sharing Defaults526864
-Node: Operation Controls527581
-Node: Optional Features528603
-Node: Reporting Bugs541329
-Node: Major Differences From The Bourne Shell542689
-Node: GNU Free Documentation License564119
-Node: Indexes589299
-Node: Builtin Index589753
-Node: Reserved Word Index596854
-Node: Variable Index599302
-Node: Function Index616718
-Node: Concept Index630854
+Node: Top904
+Node: Introduction2848
+Node: What is Bash?3064
+Node: What is a shell?4200
+Node: Definitions6813
+Node: Basic Shell Features10143
+Node: Shell Syntax11370
+Node: Shell Operation12400
+Node: Quoting13694
+Node: Escape Character15035
+Node: Single Quotes15573
+Node: Double Quotes15925
+Node: ANSI-C Quoting17273
+Node: Locale Translation18670
+Node: Creating Internationalized Scripts20076
+Node: Comments24277
+Node: Shell Commands25047
+Node: Reserved Words25989
+Node: Simple Commands27135
+Node: Pipelines27800
+Node: Lists31059
+Node: Compound Commands33011
+Node: Looping Constructs34023
+Node: Conditional Constructs36575
+Node: Command Grouping51715
+Node: Coprocesses53210
+Node: GNU Parallel55899
+Node: Shell Functions56820
+Node: Shell Parameters65271
+Node: Positional Parameters70175
+Node: Special Parameters71268
+Node: Shell Expansions74732
+Node: Brace Expansion76924
+Node: Tilde Expansion80263
+Node: Shell Parameter Expansion83221
+Node: Command Substitution103871
+Node: Arithmetic Expansion107725
+Node: Process Substitution108904
+Node: Word Splitting110015
+Node: Filename Expansion112462
+Node: Pattern Matching115689
+Node: Quote Removal121458
+Node: Redirections121765
+Node: Executing Commands132024
+Node: Simple Command Expansion132694
+Node: Command Search and Execution134805
+Node: Command Execution Environment137252
+Node: Environment140781
+Node: Exit Status142687
+Node: Signals144749
+Node: Shell Scripts149700
+Node: Shell Builtin Commands153001
+Node: Bourne Shell Builtins155345
+Node: Bash Builtins182067
+Node: Modifying Shell Behavior219806
+Node: The Set Builtin220151
+Node: The Shopt Builtin232148
+Node: Special Builtins249204
+Node: Shell Variables250196
+Node: Bourne Shell Variables250633
+Node: Bash Variables253144
+Node: Bash Features292431
+Node: Invoking Bash293448
+Node: Bash Startup Files300035
+Node: Interactive Shells305280
+Node: What is an Interactive Shell?305691
+Node: Is this Shell Interactive?306356
+Node: Interactive Shell Behavior307183
+Node: Bash Conditional Expressions310947
+Node: Shell Arithmetic316367
+Node: Aliases319697
+Node: Arrays322834
+Node: The Directory Stack330540
+Node: Directory Stack Builtins331340
+Node: Controlling the Prompt335788
+Node: The Restricted Shell338675
+Node: Bash POSIX Mode341771
+Node: Shell Compatibility Mode361590
+Node: Job Control370600
+Node: Job Control Basics371060
+Node: Job Control Builtins377431
+Node: Job Control Variables384222
+Node: Command Line Editing385456
+Node: Introduction and Notation387162
+Node: Readline Interaction389517
+Node: Readline Bare Essentials390708
+Node: Readline Movement Commands392519
+Node: Readline Killing Commands393518
+Node: Readline Arguments395544
+Node: Searching396637
+Node: Readline Init File398883
+Node: Readline Init File Syntax400189
+Node: Conditional Init Constructs427143
+Node: Sample Init File431531
+Node: Bindable Readline Commands434654
+Node: Commands For Moving436195
+Node: Commands For History438662
+Node: Commands For Text444056
+Node: Commands For Killing448184
+Node: Numeric Arguments450975
+Node: Commands For Completion452130
+Node: Keyboard Macros457829
+Node: Miscellaneous Commands458533
+Node: Readline vi Mode466079
+Node: Programmable Completion467059
+Node: Programmable Completion Builtins476798
+Node: A Programmable Completion Example488538
+Node: Using History Interactively493886
+Node: Bash History Facilities494570
+Node: Bash History Builtins498308
+Node: History Interaction505906
+Node: Event Designators510859
+Node: Word Designators512440
+Node: Modifiers514835
+Node: Installing Bash516775
+Node: Basic Installation517894
+Node: Compilers and Options521773
+Node: Compiling For Multiple Architectures522526
+Node: Installation Names524282
+Node: Specifying the System Type526519
+Node: Sharing Defaults527268
+Node: Operation Controls527985
+Node: Optional Features529007
+Node: Reporting Bugs541733
+Node: Major Differences From The Bourne Shell543093
+Node: GNU Free Documentation License564523
+Node: Indexes589703
+Node: Builtin Index590157
+Node: Reserved Word Index597258
+Node: Variable Index599706
+Node: Function Index617122
+Node: Concept Index631258
End Tag Table
diff --git a/doc/bashref.texi b/doc/bashref.texi
index 20671707..903fef25 100644
--- a/doc/bashref.texi
+++ b/doc/bashref.texi
@@ -9707,6 +9707,13 @@ the @code{command} builtin or another non-special builtin fails.
There is ambiguity in @sc{posix} about this.
@end ignore
+@item
+Bash does not perform redirections before expanding variable assignments
+preceding a simple command; it does not allow the redirections access to
+the results of the variable assignments, but any side effects of expanding
+the redirections take place first.
+If compiled in @i{strict posix} mode, Bash performs redirections first.
+
@item
As noted above, Bash requires the @code{xpg_echo} option to be enabled for
the @code{echo} builtin to be fully conformant.
diff --git a/doc/version.texi b/doc/version.texi
index c3a5142a..67d46a64 100644
--- a/doc/version.texi
+++ b/doc/version.texi
@@ -2,10 +2,10 @@
Copyright (C) 1988-2026 Free Software Foundation, Inc.
@end ignore
-@set LASTCHANGE Wed Jan 14 15:46:16 EST 2026
+@set LASTCHANGE Fri Feb 27 12:23:35 EST 2026
@set EDITION 5.3
@set VERSION 5.3
-@set UPDATED 14 January 2026
-@set UPDATED-MONTH January 2026
+@set UPDATED 27 February 2026
+@set UPDATED-MONTH February 2026
diff --git a/execute_cmd.c b/execute_cmd.c
index f7fbd71f..2e3df00f 100644
--- a/execute_cmd.c
+++ b/execute_cmd.c
@@ -106,6 +106,7 @@ extern int errno;
# include /* mbschr */
#endif
+extern WORD_LIST *subst_assign_varlist;
extern int command_string_index;
extern char *the_printed_command;
extern time_t shell_start_time;
@@ -4272,10 +4273,15 @@ execute_null_command (REDIRECT *redirects, int pipe_in, int pipe_out, int async)
if (code)
exit (EXECUTION_FAILURE);
- if (do_redirections (redirects, RX_ACTIVE) == 0)
- exit (EXECUTION_SUCCESS);
- else
+ if (do_redirections (redirects, RX_ACTIVE) != 0)
exit (EXECUTION_FAILURE);
+
+#if defined (STRICT_POSIX)
+ if (posixly_correct)
+ exit (subst_assign_varlist ? expand_assignment_statements ((char *)NULL, 1) : EXECUTION_SUCCESS);
+ else
+#endif
+ exit (EXECUTION_SUCCESS);
}
else
{
@@ -4300,6 +4306,11 @@ execute_null_command (REDIRECT *redirects, int pipe_in, int pipe_out, int async)
cleanup_redirects (redirection_undo_list);
redirection_undo_list = (REDIRECT *)NULL;
+#if defined (STRICT_POSIX)
+ if (r == 0 && posixly_correct && subst_assign_varlist)
+ expand_assignment_statements ((char *)NULL, 1);
+#endif
+
if (r != 0)
return (EXECUTION_FAILURE);
else if (last_command_subst_pid != NO_PID)
@@ -5608,6 +5619,11 @@ execute_subshell_builtin_or_function (WORD_LIST *words, REDIRECT *redirects,
add_unwind_protect (uw_cleanup_redirects, (char *)saved_undo_list);
}
+#if defined (STRICT_POSIX)
+ if (posixly_correct && subst_assign_varlist)
+ expand_assignment_statements (this_command_name, 0);
+#endif
+
if (builtin)
{
int subshell_exit_value;
@@ -5743,6 +5759,11 @@ execute_builtin_or_function (WORD_LIST *words,
add_unwind_protect (uw_cleanup_redirects, (char *)saved_undo_list);
}
+#if defined (STRICT_POSIX)
+ if (posixly_correct && subst_assign_varlist)
+ expand_assignment_statements (this_command_name, 0);
+#endif
+
if (builtin)
result = execute_builtin (builtin, words, flags, 0);
else
@@ -5920,8 +5941,13 @@ execute_disk_command (WORD_LIST *words, REDIRECT *redirects, char *command_line,
if (nofork && pipe_in == NO_PIPE && pipe_out == NO_PIPE && (subshell_environment & SUBSHELL_PIPE) == 0)
adjust_shell_level (-1);
- maybe_make_export_env ();
- put_command_name_into_env (command);
+#if defined (STRICT_POSIX)
+ if (posixly_correct == 0 || subst_assign_varlist == 0) /* Done below. */
+#endif
+ {
+ maybe_make_export_env ();
+ put_command_name_into_env (command);
+ }
}
else if (command == 0 && notfound_str == 0) /* make sure */
init_notfound_str ();
@@ -6001,9 +6027,20 @@ execute_disk_command (WORD_LIST *words, REDIRECT *redirects, char *command_line,
exit (EXECUTION_FAILURE);
}
+#if defined (STRICT_POSIX)
+ if (posixly_correct && subst_assign_varlist)
+ {
+ expand_assignment_statements (command, 0);
+
+ maybe_make_export_env ();
+ put_command_name_into_env (command);
+ }
+#endif
+
#if defined (PROCESS_SUBSTITUTION) && !defined (HAVE_DEV_FD)
/* This should only contain FIFOs created as part of redirection
- expansion. */
+ expansion and expanding the rhs of assignment statements in
+ posix mode. */
unlink_all_fifos ();
#endif
diff --git a/m4/environ.m4 b/m4/environ.m4
new file mode 100644
index 00000000..5c0644ab
--- /dev/null
+++ b/m4/environ.m4
@@ -0,0 +1,48 @@
+# environ.m4
+# serial 8
+dnl Copyright (C) 2001-2004, 2006-2026 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
+
+AC_DEFUN_ONCE([gl_ENVIRON],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ dnl Persuade glibc to declare environ.
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+ AC_CHECK_HEADERS_ONCE([unistd.h])
+ gt_CHECK_VAR_DECL(
+ [#if HAVE_UNISTD_H
+ #include
+ #endif
+ /* mingw, BeOS, Haiku declare environ in , not in . */
+ #include
+ ],
+ [environ])
+ if test $gt_cv_var_environ_declaration != yes; then
+ HAVE_DECL_ENVIRON=0
+ fi
+])
+
+# Check if a variable is properly declared.
+# gt_CHECK_VAR_DECL(includes,variable)
+AC_DEFUN([gt_CHECK_VAR_DECL],
+[
+ define([gt_cv_var], [gt_cv_var_]$2[_declaration])
+ AC_CACHE_CHECK([if $2 is properly declared], [gt_cv_var],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[$1
+ typedef struct { int foo; } foo_t;
+ extern foo_t $2;]],
+ [[$2.foo = 1;]])],
+ [gt_cv_var=no],
+ [gt_cv_var=yes])])
+ if test $gt_cv_var = yes; then
+ AC_DEFINE([HAVE_]m4_translit($2, [a-z], [A-Z])[_DECL], 1,
+ [Define if you have the declaration of $2.])
+ fi
+ undefine([gt_cv_var])
+])
diff --git a/print_cmd.c b/print_cmd.c
index 17b058e4..d6adc37c 100644
--- a/print_cmd.c
+++ b/print_cmd.c
@@ -843,7 +843,7 @@ print_if_command (IF_COM *if_command)
semicolon ();
if (was_heredoc)
{
- indent (indentation_amount);
+ indent (indentation);
cprintf ("then\n");
was_heredoc = 0;
}
diff --git a/subst.c b/subst.c
index 87637e69..67677d33 100644
--- a/subst.c
+++ b/subst.c
@@ -12722,10 +12722,12 @@ separate_out_assignments (WORD_LIST *tlist)
#define WEXP_TILDEEXP 0x004
#define WEXP_PARAMEXP 0x008
#define WEXP_PATHEXP 0x010
+#define WEXP_DEFERVARS 0x020
/* All of the expansions, including variable assignments at the start of
the list. */
#define WEXP_ALL (WEXP_VARASSIGN|WEXP_BRACEEXP|WEXP_TILDEEXP|WEXP_PARAMEXP|WEXP_PATHEXP)
+#define WEXP_POSIX (WEXP_ALL|WEXP_DEFERVARS)
/* All of the expansions except variable assignments at the start of
the list. */
@@ -12739,11 +12741,16 @@ separate_out_assignments (WORD_LIST *tlist)
/* Take the list of words in LIST and do the various substitutions. Return
a new list of words which is the expanded list, and without things like
variable assignments. */
-
+/* This is only called to expand the words of a simple command, so it can
+ pay attention to posix mode treatment of variable assignments. */
WORD_LIST *
expand_words (WORD_LIST *list)
{
+#if defined (STRICT_POSIX)
+ return (expand_word_list_internal (list, posixly_correct ? WEXP_POSIX : WEXP_ALL));
+#else
return (expand_word_list_internal (list, WEXP_ALL));
+#endif
}
/* Same as expand_words (), but doesn't hack variable or environment
@@ -13404,7 +13411,7 @@ expand_word_list_internal (WORD_LIST *list, int eflags)
garglist = new_list = separate_out_assignments (new_list);
if (new_list == 0)
{
- if (subst_assign_varlist)
+ if (subst_assign_varlist && (eflags & WEXP_DEFERVARS) == 0)
expand_assignment_statements ((char *)NULL, 1);
return ((WORD_LIST *)NULL);
@@ -13438,7 +13445,7 @@ expand_word_list_internal (WORD_LIST *list, int eflags)
new_list = dequote_list (new_list);
}
- if ((eflags & WEXP_VARASSIGN) && subst_assign_varlist)
+ if (((eflags & (WEXP_VARASSIGN|WEXP_DEFERVARS)) == WEXP_VARASSIGN) && subst_assign_varlist)
expand_assignment_statements ((new_list && new_list->word) ? new_list->word->word : (char *)NULL, new_list == 0);
return (new_list);
diff --git a/subst.h b/subst.h
index e7fdfe96..69f966e9 100644
--- a/subst.h
+++ b/subst.h
@@ -1,6 +1,6 @@
/* subst.h -- Names of externally visible functions in subst.c. */
-/* Copyright (C) 1993-2024 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2026 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
diff --git a/support/savedir/texi2html.debug b/support/savedir/texi2html.debug
deleted file mode 100755
index dbe15cd2..00000000
--- a/support/savedir/texi2html.debug
+++ /dev/null
@@ -1,5439 +0,0 @@
-#! /usr/bin/perl
-'di ';
-'ig 00 ';
-#+##############################################################################
-#
-# texi2html: Program to transform Texinfo documents to HTML
-#
-# Copyright (C) 1999, 2000 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-#-##############################################################################
-
-# This requires perl version 5 or higher
-require 5.0;
-
-#++##############################################################################
-#
-# NOTE FOR DEBUGGING THIS SCRIPT:
-# You can run 'perl texi2html.pl' directly, provided you have
-# the environment variable T2H_HOME set to the directory containing
-# the texi2html.init file
-#
-#--##############################################################################
-
-# CVS version:
-# $Id: texi2html.pl,v 1.55 2000/07/27 14:39:41 obachman Exp $
-
-# Homepage:
-$T2H_HOMEPAGE = < (original author)
- Karl Berry
- Olaf Bachmann
- and many others.
-Maintained by: Olaf Bachmann
-Send bugs and suggestions to
-EOT
-
-# Version: set in configure.in
-$THISVERSION = '1.64';
-$THISPROG = "texi2html $THISVERSION"; # program name and version
-
-# The man page for this program is included at the end of this file and can be
-# viewed using the command 'nroff -man texi2html'.
-
-# Identity:
-
-$T2H_TODAY = &pretty_date; # like "20 September 1993"
-# the eval prevents this from breaking on system which do not have
-# a proper getpwuid implemented
-eval { ($T2H_USER = (getpwuid ($<))[6]) =~ s/,.*//;}; # Who am i
-
-#+++############################################################################
-# #
-# Initialization #
-# Pasted content of File $(srcdir)/texi2html.init: Default initializations #
-# #
-#---############################################################################
-
-# leave this within comments, and keep the require statement
-# This way, you can directly run texi2html.pl, if $ENV{T2H_HOME}/texi2html.init
-# exists.
-
-#
-# -*-perl-*-
-######################################################################
-# File: texi2html.init
-#
-# Sets default values for command-line arguments and for various customizable
-# procedures
-#
-# A copy of this file is pasted into the beginning of texi2html by
-# 'make texi2html'
-#
-# Copy this file and make changes to it, if you like.
-# Afterwards, either, load it with command-line option -init_file
-#
-# $Id: texi2html.init,v 1.34 2000/07/27 14:09:02 obachman Exp $
-
-######################################################################
-# stuff which can also be set by command-line options
-#
-#
-# Note: values set here, overwrite values set by the command-line
-# options before -init_file and might still be overwritten by
-# command-line arguments following the -init_file option
-#
-
-# T2H_OPTIONS is a hash whose keys are the (long) names of valid
-# command-line options and whose values are a hash with the following keys:
-# type ==> one of !|=i|:i|=s|:s (see GetOpt::Long for more info)
-# linkage ==> ref to scalar, array, or subroutine (see GetOpt::Long for more info)
-# verbose ==> short description of option (displayed by -h)
-# noHelp ==> if 1 -> for "not so important options": only print description on -h 1
-# 2 -> for obsolete options: only print description on -h 2
-
-$T2H_DEBUG = 0;
-$T2H_OPTIONS -> {debug} =
-{
- type => '=i',
- linkage => \$main::T2H_DEBUG,
- verbose => 'output HTML with debuging information',
-};
-
-$T2H_DOCTYPE = '';
-$T2H_OPTIONS -> {doctype} =
-{
- type => '=s',
- linkage => \$main::T2H_DOCTYPE,
- verbose => 'document type which is output in header of HTML files',
- noHelp => 1
-};
-
-$T2H_CHECK = 0;
-$T2H_OPTIONS -> {check} =
-{
- type => '!',
- linkage => \$main::T2H_CHECK,
- verbose => 'if set, only check files and output all things that may be Texinfo commands',
- noHelp => 1
-};
-
-# -expand
-# if set to "tex" (or, "info") expand @iftex and @tex (or, @ifinfo) sections
-# else, neither expand @iftex, @tex, nor @ifinfo sections
-$T2H_EXPAND = "info";
-$T2H_OPTIONS -> {expand} =
-{
- type => '=s',
- linkage => \$T2H_EXPAND,
- verbose => 'Expand info|tex|none section of texinfo source',
-};
-
-# - glossary
-#if set, uses section named `Footnotes' for glossary
-$T2H_USE_GLOSSARY = 0;
-T2H_OPTIONS -> {glossary} =
-{
- type => '!',
- linkage => \$T2H_USE_GLOSSARY,
- verbose => "if set, uses section named `Footnotes' for glossary",
- noHelp => 1,
-};
-
-
-# -invisible
-# $T2H_INVISIBLE_MARK is the text used to create invisible destination
-# anchors for index links (you can for instance use the invisible.xbm
-# file shipped with this program). This is a workaround for a known
-# bug of many WWW browsers, including netscape.
-# For me, it works fine without it -- on the contrary: if there, it
-# inserts space between headers and start of text (obachman 3/99)
-$T2H_INVISIBLE_MARK = '';
-# $T2H_INVISIBLE_MARK = ' ';
-$T2H_OPTIONS -> {invisible} =
-{
- type => '=s',
- linkage => \$T2H_INVISIBLE_MARK,
- verbose => 'use text in invisble anchot',
- noHelp => 1,
-};
-
-# -iso
-# if set, ISO8879 characters are used for special symbols (like copyright, etc)
-$T2H_USE_ISO = 0;
-$T2H_OPTIONS -> {iso} =
-{
- type => 'iso',
- linkage => \$T2H_USE_ISO,
- verbose => 'if set, ISO8879 characters are used for special symbols (like copyright, etc)',
- noHelp => 1,
-};
-
-# -I
-# list directories where @include files are searched for (besides the
-# directory of the doc file) additional '-I' args add to this list
-@T2H_INCLUDE_DIRS = (".");
-$T2H_OPTIONS -> {I} =
-{
- type => '=s',
- linkage => \@T2H_INCLUDE_DIRS,
- verbose => 'append $s to the @include search path',
-};
-
-# -top_file
-# uses file of this name for top-level file
-# extension is manipulated appropriately, if necessary.
-# If empty, .html is used
-# Typically, you would set this to "index.html".
-$T2H_TOP_FILE = '';
-$T2H_OPTIONS -> {top_file} =
-{
- type => '=s',
- linkage => \$T2H_TOP_FILE,
- verbose => 'use $s as top file, instead of .html',
-};
-
-
-# -toc_file
-# uses file of this name for table of contents file
-# extension is manipulated appropriately, if necessary.
-# If empty, _toc.html is used
-$T2H_TOC_FILE = '';
-$T2H_OPTIONS -> {toc_file} =
-{
- type => '=s',
- linkage => \$T2H_TOC_FILE,
- verbose => 'use $s as ToC file, instead of _toc.html',
-};
-
-# -frames
-# if set, output two additional files which use HTML 4.0 "frames".
-$T2H_FRAMES = 0;
-$T2H_OPTIONS -> {frames} =
-{
- type => '!',
- linkage => \$T2H_FRAMES,
- verbose => 'output files which use HTML 4.0 frames (experimental)',
- noHelp => 1,
-};
-
-
-# -menu | -nomenu
-# if set, show the Texinfo menus
-$T2H_SHOW_MENU = 1;
-$T2H_OPTIONS -> {menu} =
-{
- type => '!',
- linkage => \$T2H_SHOW_MENU,
- verbose => 'ouput Texinfo menus',
-};
-
-# -number | -nonumber
-# if set, number sections and show section names and numbers in references
-# and menus
-$T2H_NUMBER_SECTIONS = 1;
-$T2H_OPTIONS -> {number} =
-{
- type => '!',
- linkage => \$T2H_NUMBER_SECTIONS,
- verbose => 'use numbered sections'
-};
-
-# if set, and T2H_NUMBER_SECTIONS is set, then use node names in menu
-# entries, instead of section names
-$T2H_NODE_NAME_IN_MENU = 0;
-
-# if set and menu entry equals menu descr, then do not print menu descr.
-# Likewise, if node name equals entry name, do not print entry name.
-$T2H_AVOID_MENU_REDUNDANCY = 1;
-
-# -split section|chapter|none
-# if set to 'section' (resp. 'chapter') create one html file per (sub)section
-# (resp. chapter) and separate pages for Top, ToC, Overview, Index,
-# Glossary, About.
-# otherwise, create monolithic html file which contains whole document
-#$T2H_SPLIT = 'section';
-$T2H_SPLIT = '';
-$T2H_OPTIONS -> {split} =
-{
- type => '=s',
- linkage => \$T2H_SPLIT,
- verbose => 'split document on section|chapter else no splitting',
-};
-
-# -section_navigation|-no-section_navigation
-# if set, then navigation panels are printed at the beginning of each section
-# and, possibly at the end (depending on whether or not there were more than
-# $T2H_WORDS_IN_PAGE words on page
-# This is most useful if you do not want to have section navigation
-# on -split chapter
-$T2H_SECTION_NAVIGATION = 1;
-$T2H_OPTIONS -> {sec_nav} =
-{
- type => '!',
- linkage => \$T2H_SECTION_NAVIGATION,
- verbose => 'output navigation panels for each section',
-};
-
-# -subdir
-# if set put result files in this directory
-# if not set result files are put into current directory
-#$T2H_SUBDIR = 'html';
-$T2H_SUBDIR = '';
-$T2H_OPTIONS -> {subdir} =
-{
- type => '=s',
- linkage => \$T2H_SUBDIR,
- verbose => 'put HTML files in directory $s, instead of $cwd',
-};
-
-# -short_extn
-# If this is set all HTML file will have extension ".htm" instead of
-# ".html". This is helpful when shipping the document to PC systems.
-$T2H_SHORTEXTN = 0;
-$T2H_OPTIONS -> {short_ext} =
-{
- type => '!',
- linkage => \$T2H_SHORTEXTN,
- verbose => 'use "htm" extension for output HTML files',
-};
-
-
-# -prefix
-# Set the output file prefix, prepended to all .html, .gif and .pl files.
-# By default, this is the basename of the document
-$T2H_PREFIX = '';
-$T2H_OPTIONS -> {prefix} =
-{
- type => '=s',
- linkage => \$T2H_PREFIX,
- verbose => 'use as prefix for output files, instead of ',
-};
-
-# -o filename
-# If set, generate monolithic document output html into $filename
-$T2H_OUT = '';
-$T2H_OPTIONS -> {out_file} =
-{
- type => '=s',
- linkage => sub {$main::T2H_OUT = @_[1]; $T2H_SPLIT = '';},
- verbose => 'if set, all HTML output goes into file $s',
-};
-
-# -short_ref
-#if set cross-references are given without section numbers
-$T2H_SHORT_REF = '';
-$T2H_OPTIONS -> {short_ref} =
-{
- type => '!',
- linkage => \$T2H_SHORT_REF,
- verbose => 'if set, references are without section numbers',
-};
-
-# -idx_sum
-# if value is set, then for each @prinindex $what
-# $docu_name_$what.idx is created which contains lines of the form
-# $key\t$ref sorted alphabetically (case matters)
-$T2H_IDX_SUMMARY = 0;
-$T2H_OPTIONS -> {idx_sum} =
-{
- type => '!',
- linkage => \$T2H_IDX_SUMMARY,
- verbose => 'if set, also output index summary',
- noHelp => 1,
-};
-
-# -verbose
-# if set, chatter about what we are doing
-$T2H_VERBOSE = '';
-$T2H_OPTIONS -> {Verbose} =
-{
- type => '!',
- linkage => \$T2H_VERBOSE,
- verbose => 'print progress info to stdout',
-};
-
-# -lang
-# For page titles use $T2H_WORDS->{$T2H_LANG}->{...} as title.
-# To add a new language, supply list of titles (see $T2H_WORDS below).
-# and use ISO 639 language codes (see e.g. perl module Locale-Codes-1.02
-# for definitions)
-# Default's to 'en' if not set or no @documentlanguage is specified
-$T2H_LANG = '';
-$T2H_OPTIONS -> {lang} =
-{
- type => '=s',
- linkage => sub {SetDocumentLanguage($_[1])},
- verbose => 'use $s as document language (ISO 639 encoding)',
-};
-
-# -l2h
-# if set, uses latex2html for generation of math content
-$T2H_L2H = '';
-$T2H_OPTIONS -> {l2h} =
-{
- type => '!',
- linkage => \$T2H_L2H,
- verbose => 'if set, uses latex2html for @math and @tex',
-};
-
-######################
-# The following options are only relevant if $T2H_L2H is set
-#
-# -l2h_l2h
-# name/location of latex2html progam
-$T2H_L2H_L2H = "latex2html";
-$T2H_OPTIONS -> {l2h_l2h} =
-{
- type => '=s',
- linkage => \$T2H_L2H_L2H,
- verbose => 'program to use for latex2html translation',
- noHelp => 1,
-};
-
-# -l2h_skip
-# if set, skips actual call to latex2html tries to reuse previously generated
-# content, instead
-$T2H_L2H_SKIP = '';
-$T2H_OPTIONS -> {l2h_skip} =
-{
- type => '!',
- linkage => \$T2H_L2H_SKIP,
- verbose => 'if set, tries to reuse previously latex2html output',
- noHelp => 1,
-};
-
-# -l2h_tmp
-# if set, l2h uses this directory for temporarary files. The path
-# leading to this directory may not contain a dot (i.e., a "."),
-# otherwise, l2h will fail
-$T2H_L2H_TMP = '';
-$T2H_OPTIONS -> {l2h_tmp} =
-{
- type => '=s',
- linkage => \$T2H_L2H_TMP,
- verbose => 'if set, uses $s as temporary latex2html directory',
- noHelp => 1,
-};
-
-# if set, cleans intermediate files (they all have the prefix $doc_l2h_)
-# of l2h
-$T2H_L2H_CLEAN = 1;
-$T2H_OPTIONS -> {l2h_clean} =
-{
- type => '!',
- linkage => \$T2H_L2H_CLEAN,
- verbose => 'if set, do not keep intermediate latex2html files for later reuse',
- noHelp => 1,
-};
-
-$T2H_OPTIONS -> {D} =
-{
- type => '=s',
- linkage => sub {$main::value{@_[1]} = 1;},
- verbose => 'equivalent to Texinfo "@set $s 1"',
- noHelp => 1,
-};
-
-$T2H_OPTIONS -> {init_file} =
-{
- type => '=s',
- linkage => \&LoadInitFile,
- verbose => 'load init file $s'
-};
-
-
-##############################################################################
-#
-# The following can only be set in the init file
-#
-##############################################################################
-
-# if set, center @image by default
-# otherwise, do not center by default
-$T2H_CENTER_IMAGE = 1;
-
-# used as identation for block enclosing command @example, etc
-# If not empty, must be enclosed in |
-$T2H_EXAMPLE_INDENT_CELL = ' | ';
-# same as above, only for @small
-$T2H_SMALL_EXAMPLE_INDENT_CELL = ' | ';
-# font size for @small
-$T2H_SMALL_FONT_SIZE = '-1';
-
-# if non-empty, and no @..heading appeared in Top node, then
-# use this as header for top node/section, otherwise use value of
-# @settitle or @shorttitle (in that order)
-$T2H_TOP_HEADING = '';
-
-# if set, use this chapter for 'Index' button, else
-# use first chapter whose name matches 'index' (case insensitive)
-$T2H_INDEX_CHAPTER = '';
-
-# if set and $T2H_SPLIT is set, then split index pages at the next letter
-# after they have more than that many entries
-$T2H_SPLIT_INDEX = 100;
-
-# if set (e.g., to index.html) replace hrefs to this file
-# (i.e., to index.html) by ./
-$T2H_HREF_DIR_INSTEAD_FILE = '';
-
-########################################################################
-# Language dependencies:
-# To add a new language extend T2H_WORDS hash and create $T2H_<...>_WORDS hash
-# To redefine one word, simply do:
-# $T2H_WORDS->{}->{} = 'whatever' in your personal init file.
-#
-$T2H_WORDS_EN =
-{
- # titles of pages
- 'ToC_Title' => 'Table of Contents',
- 'Overview_Title' => 'Short Table of Contents',
- 'Index_Title' => 'Index',
- 'About_Title' => 'About this document',
- 'Footnotes_Title' => 'Footnotes',
- 'See' => 'See',
- 'see' => 'see',
- 'section' => 'section',
-# If necessary, we could extend this as follows:
-# # text for buttons
-# 'Top_Button' => 'Top',
-# 'ToC_Button' => 'Contents',
-# 'Overview_Button' => 'Overview',
-# 'Index_button' => 'Index',
-# 'Back_Button' => 'Back',
-# 'FastBack_Button' => 'FastBack',
-# 'Prev_Button' => 'Prev',
-# 'Up_Button' => 'Up',
-# 'Next_Button' => 'Next',
-# 'Forward_Button' =>'Forward',
-# 'FastWorward_Button' => 'FastForward',
-# 'First_Button' => 'First',
-# 'Last_Button' => 'Last',
-# 'About_Button' => 'About'
-};
-
-$T2H_WORD_DE =
-{
- 'ToC_Title' => 'Inhaltsverzeichniss',
- 'Overview_Title' => 'Kurzes Inhaltsverzeichniss',
- 'Index_Title' => 'Index',
- 'About_Title' => 'Über dieses Dokument',
- 'Footnotes_Title' => 'Fußnoten',
- 'See' => 'Siehe',
- 'see' => 'siehe',
- 'section' => 'Abschnitt',
-};
-
-$T2H_WORD_NL =
-{
- 'ToC_Title' => 'Inhoudsopgave',
- 'Overview_Title' => 'Korte inhoudsopgave',
- 'Index_Title' => 'Index', #Not sure ;-)
- 'About_Title' => 'No translation available!', #No translation available!
- 'Footnotes_Title' => 'No translation available!', #No translation available!
- 'See' => 'Zie',
- 'see' => 'zie',
- 'section' => 'sectie',
-};
-
-$T2H_WORD_ES =
-{
- 'ToC_Title' => 'índice General',
- 'Overview_Title' => 'Resumen del Contenido',
- 'Index_Title' => 'Index', #Not sure ;-)
- 'About_Title' => 'No translation available!', #No translation available!
- 'Footnotes_Title' => 'Fußnoten',
- 'See' => 'Véase',
- 'see' => 'véase',
- 'section' => 'sección',
-};
-
-$T2H_WORD_NO =
-{
- 'ToC_Title' => 'Innholdsfortegnelse',
- 'Overview_Title' => 'Kort innholdsfortegnelse',
- 'Index_Title' => 'Indeks', #Not sure ;-)
- 'About_Title' => 'No translation available!', #No translation available!
- 'Footnotes_Title' => 'No translation available!',
- 'See' => 'Se',
- 'see' => 'se',
- 'section' => 'avsnitt',
-};
-
-$T2H_WORD_PT =
-{
- 'ToC_Title' => 'Sumário',
- 'Overview_Title' => 'Breve Sumário',
- 'Index_Title' => 'Índice', #Not sure ;-)
- 'About_Title' => 'No translation available!', #No translation available!
- 'Footnotes_Title' => 'No translation available!',
- 'See' => 'Veja',
- 'see' => 'veja',
- 'section' => 'Seção',
-};
-
-$T2H_WORDS =
-{
- 'en' => $T2H_WORDS_EN,
- 'de' => $T2H_WORDS_DE,
- 'nl' => $T2H_WORDS_NL,
- 'es' => $T2H_WORDS_ES,
- 'no' => $T2H_WORDS_NO,
- 'pt' => $T2H_WORDS_PT
-};
-
-@MONTH_NAMES_EN =
-(
- 'January', 'February', 'March', 'April', 'May',
- 'June', 'July', 'August', 'September', 'October',
- 'November', 'December'
-);
-
-@MONTH_NAMES_DE =
-(
- 'Januar', 'Februar', 'März', 'April', 'Mai',
- 'Juni', 'Juli', 'August', 'September', 'Oktober',
- 'November', 'Dezember'
-);
-
-@MONTH_NAMES_NL =
-(
- 'Januari', 'Februari', 'Maart', 'April', 'Mei',
- 'Juni', 'Juli', 'Augustus', 'September', 'Oktober',
- 'November', 'December'
-);
-
-@MONTH_NAMES_ES =
-(
- 'enero', 'febrero', 'marzo', 'abril', 'mayo',
- 'junio', 'julio', 'agosto', 'septiembre', 'octubre',
- 'noviembre', 'diciembre'
-);
-
-@MONTH_NAMES_NO =
-(
-
- 'januar', 'februar', 'mars', 'april', 'mai',
- 'juni', 'juli', 'august', 'september', 'oktober',
- 'november', 'desember'
-);
-
-@MONTH_NAMES_PT =
-(
- 'Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio',
- 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro',
- 'Novembro', 'Dezembro'
-);
-
-
-$MONTH_NAMES =
-{
- 'en' => \@MONTH_NAMES_EN,
- 'de' => \@MONTH_NAMES_DE,
- 'es' => \@MONTH_NAMES_ES,
- 'nl' => \@MONTH_NAMES_NL,
- 'no' => \@MONTH_NAMES_NO,
- 'pt' => \@MONTH_NAMES_PT
-};
-########################################################################
-# Control of Page layout:
-# You can make changes of the Page layout at two levels:
-# 1.) For small changes, it is often enough to change the value of
-# some global string/hash/array variables
-# 2.) For larger changes, reimplement one of the T2H_DEFAULT_* routines,
-# give them another name, and assign them to the respective
-# $T2H_ variable.
-
-# As a general interface, the hashes T2H_HREF, T2H_NAME, T2H_NODE hold
-# href, html-name, node-name of
-# This -- current section (resp. html page)
-# Top -- top page ($T2H_TOP_FILE)
-# Contents -- Table of contents
-# Overview -- Short table of contents
-# Index -- Index page
-# About -- page which explain "navigation buttons"
-# First -- first node
-# Last -- last node
-#
-# Whether or not the following hash values are set, depends on the context
-# (all values are w.r.t. 'This' section)
-# Next -- next node of texinfo
-# Prev -- previous node of texinfo
-# Up -- up node of texinfo
-# Forward -- next node in reading order
-# Back -- previous node in reading order
-# FastForward -- if leave node, up and next, else next node
-# FastBackward-- if leave node, up and prev, else prev node
-#
-# Furthermore, the following global variabels are set:
-# $T2H_THISDOC{title} -- title as set by @setttile
-# $T2H_THISDOC{fulltitle} -- full title as set by @title...
-# $T2H_THISDOC{subtitle} -- subtitle as set by @subtitle
-# $T2H_THISDOC{author} -- author as set by @author
-#
-# and pointer to arrays of lines which need to be printed by t2h_print_lines
-# $T2H_OVERVIEW -- lines of short table of contents
-# $T2H_TOC -- lines of table of contents
-# $T2H_TOP -- lines of Top texinfo node
-# $T2H_THIS_SECTION -- lines of 'This' section
-
-#
-# There are the following subs which control the layout:
-#
-$T2H_print_section = \&T2H_DEFAULT_print_section;
-$T2H_print_Top_header = \&T2H_DEFAULT_print_Top_header;
-$T2H_print_Top_footer = \&T2H_DEFAULT_print_Top_footer;
-$T2H_print_Top = \&T2H_DEFAULT_print_Top;
-$T2H_print_Toc = \&T2H_DEFAULT_print_Toc;
-$T2H_print_Overview = \&T2H_DEFAULT_print_Overview;
-$T2H_print_Footnotes = \&T2H_DEFAULT_print_Footnotes;
-$T2H_print_About = \&T2H_DEFAULT_print_About;
-$T2H_print_misc_header = \&T2H_DEFAULT_print_misc_header;
-$T2H_print_misc_footer = \&T2H_DEFAULT_print_misc_footer;
-$T2H_print_misc = \&T2H_DEFAULT_print_misc;
-$T2H_print_chapter_header = \&T2H_DEFAULT_print_chapter_header;
-$T2H_print_chapter_footer = \&T2H_DEFAULT_print_chapter_footer;
-$T2H_print_page_head = \&T2H_DEFAULT_print_page_head;
-$T2H_print_page_foot = \&T2H_DEFAULT_print_page_foot;
-$T2H_print_head_navigation = \&T2H_DEFAULT_print_head_navigation;
-$T2H_print_foot_navigation = \&T2H_DEFAULT_print_foot_navigation;
-$T2H_button_icon_img = \&T2H_DEFAULT_button_icon_img;
-$T2H_print_navigation = \&T2H_DEFAULT_print_navigation;
-$T2H_about_body = \&T2H_DEFAULT_about_body;
-$T2H_print_frame = \&T2H_DEFAULT_print_frame;
-$T2H_print_toc_frame = \&T2H_DEFAULT_print_toc_frame;
-
-########################################################################
-# Layout for html for every sections
-#
-sub T2H_DEFAULT_print_section
-{
- my $fh = shift;
- local $T2H_BUTTONS = \@T2H_SECTION_BUTTONS;
- &$T2H_print_head_navigation($fh) if $T2H_SECTION_NAVIGATION;
- my $nw = t2h_print_lines($fh);
- if ($T2H_SPLIT eq 'section' && $T2H_SECTION_NAVIGATION)
- {
- &$T2H_print_foot_navigation($fh, $nw);
- }
- else
- {
- print $fh '
' . "\n";
- }
-}
-
-###################################################################
-# Layout of top-page I recommend that you use @ifnothtml, @ifhtml,
-# @html within the Top texinfo node to specify content of top-level
-# page.
-#
-# If you enclose everything in @ifnothtml, then title, subtitle,
-# author and overview is printed
-# T2H_HREF of Next, Prev, Up, Forward, Back are not defined
-# if $T2H_SPLIT then Top page is in its own html file
-sub T2H_DEFAULT_print_Top_header
-{
- &$T2H_print_page_head(@_) if $T2H_SPLIT;
- t2h_print_label(@_); # this needs to be called, otherwise no label set
- &$T2H_print_head_navigation(@_);
-}
-sub T2H_DEFAULT_print_Top_footer
-{
- &$T2H_print_foot_navigation(@_);
- &$T2H_print_page_foot(@_) if $T2H_SPLIT;
-}
-sub T2H_DEFAULT_print_Top
-{
- my $fh = shift;
-
- # for redefining navigation buttons use:
- # local $T2H_BUTTONS = [...];
- # as it is, 'Top', 'Contents', 'Index', 'About' are printed
- local $T2H_BUTTONS = \@T2H_MISC_BUTTONS;
- &$T2H_print_Top_header($fh);
- if ($T2H_THIS_SECTION)
- {
- # if top-level node has content, then print it with extra header
- print $fh "$T2H_NAME{Top}
"
- unless ($T2H_HAS_TOP_HEADING);
- t2h_print_lines($fh, $T2H_THIS_SECTION)
- }
- else
- {
- # top-level node is fully enclosed in @ifnothtml
- # print fulltitle, subtitle, author, Overview
- print $fh
- "\n" .
- join("
\n", split(/\n/, $T2H_THISDOC{fulltitle})) .
- "
\n";
- print $fh "$T2H_THISDOC{subtitle}
\n" if $T2H_THISDOC{subtitle};
- print $fh "$T2H_THISDOC{author}\n" if $T2H_THISDOC{author};
- print $fh <
-
-
- Overview:
-
-EOT
- t2h_print_lines($fh, $T2H_OVERVIEW);
- print $fh "
\n";
- }
- &$T2H_print_Top_footer($fh);
-}
-
-###################################################################
-# Layout of Toc, Overview, and Footnotes pages
-# By default, we use "normal" layout
-# T2H_HREF of Next, Prev, Up, Forward, Back, etc are not defined
-# use: local $T2H_BUTTONS = [...] to redefine navigation buttons
-sub T2H_DEFAULT_print_Toc
-{
- return &$T2H_print_misc(@_);
-}
-sub T2H_DEFAULT_print_Overview
-{
- return &$T2H_print_misc(@_);
-}
-sub T2H_DEFAULT_print_Footnotes
-{
- return &$T2H_print_misc(@_);
-}
-sub T2H_DEFAULT_print_About
-{
- return &$T2H_print_misc(@_);
-}
-
-sub T2H_DEFAULT_print_misc_header
-{
- &$T2H_print_page_head(@_) if $T2H_SPLIT;
- # this needs to be called, otherwise, no labels are set
- t2h_print_label(@_);
- &$T2H_print_head_navigation(@_);
-}
-sub T2H_DEFAULT_print_misc_footer
-{
- &$T2H_print_foot_navigation(@_);
- &$T2H_print_page_foot(@_) if $T2H_SPLIT;
-}
-sub T2H_DEFAULT_print_misc
-{
- my $fh = shift;
- local $T2H_BUTTONS = \@T2H_MISC_BUTTONS;
- &$T2H_print_misc_header($fh);
- print $fh "$T2H_NAME{This}
\n";
- t2h_print_lines($fh);
- &$T2H_print_misc_footer($fh);
-}
-
-###################################################################
-# chapter_header and chapter_footer are only called if
-# T2H_SPLIT eq 'chapter'
-# chapter_header: after print_page_header, before print_section
-# chapter_footer: after print_section of last section, before print_page_footer
-#
-# If you want to get rid of navigation stuff after each section,
-# redefine print_section such that it does not call print_navigation,
-# and put print_navigation into print_chapter_header
-@T2H_CHAPTER_BUTTONS =
- (
- 'FastBack', 'FastForward', ' ',
- ' ', ' ', ' ', ' ',
- 'Top', 'Contents', 'Index', 'About',
- );
-
-sub T2H_DEFAULT_print_chapter_header
-{
- # nothing to do there, by default
- if (! $T2H_SECTION_NAVIGATION)
- {
- my $fh = shift;
- local $T2H_BUTTONS = \@T2H_CHAPTER_BUTTONS;
- &$T2H_print_navigation($fh);
- print $fh "\n
\n";
- }
-}
-
-sub T2H_DEFAULT_print_chapter_footer
-{
- local $T2H_BUTTONS = \@T2H_CHAPTER_BUTTONS;
- &$T2H_print_navigation(@_);
-}
-###################################################################
-$T2H_TODAY = &pretty_date; # like "20 September 1993"
-
-sub pretty_date {
- local($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst);
-
- ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time);
- $year += ($year < 70) ? 2000 : 1900;
- # obachman: Let's do it as the Americans do
- return($MONTH_NAMES->{$T2H_LANG}[$mon] . ", " . $mday . " " . $year);
-}
-
-
-###################################################################
-# Layout of standard header and footer
-#
-
-# Set the default body text, inserted between
-###$T2H_BODYTEXT = 'LANG="EN" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000"';
-$T2H_BODYTEXT = 'LANG="' . $T2H_LANG . '" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000"';
-# text inserted after
-$T2H_AFTER_BODY_OPEN = '';
-#text inserted before
-$T2H_PRE_BODY_CLOSE = '';
-# this is used in footer
-$T2H_ADDRESS = "by $T2H_USER " if $T2H_USER;
-$T2H_ADDRESS .= "on $T2H_TODAY";
-# this is added inside after and some META NAME stuff
-# can be used for